{"ok":true,"data":{"site":"fs.disk.zone","name":"disk.zone FS API","version":"1.0.0","description":"disk.zone 的 FS 文件存储：以根目录组织，文件分发在 Cloudflare 的静态资源 CDN 上，按路径或按 key 下载；用 disk.zone 账号管理。","base_url":"https://fs.disk.zone","links":{"openapi":"https://fs.disk.zone/api/openapi.json","llms_txt":"https://fs.disk.zone/llms.txt","docs":"https://fs.disk.zone/docs","health":"https://fs.disk.zone/api/health","platform":"https://disk.zone/developers","app":"https://fs.disk.zone/app","account":"https://disk.zone/app/account"},"auth":{"cookie":{"title":"浏览器登录","how":"在 disk.zone 任一页面登录后，*.disk.zone 下的页面共享登录状态（HttpOnly Cookie）；本站网页直接调用接口即可。"},"bearer":{"title":"Bearer 访问令牌","how":"POST https://disk.zone/api/auth/login 时传 \"mode\":\"token\"，拿到 15 分钟有效的 access_token，以 Authorization: Bearer <access_token> 调用。"},"api_key":{"title":"账户 API Key","how":"在 https://disk.zone/app/account 创建，格式 dzk.<用户名>.<keyid>.<secret>，以 Authorization: Bearer dzk.… 调用；适合脚本和 AI 智能体。"}},"conventions":{"envelope":{"success":"{\"ok\":true,\"data\":…}","failure":"{\"ok\":false,\"error\":{\"code\":\"snake_case\",\"message\":\"中文说明\"}}"},"errors":{"description":"error.code 是稳定的 snake_case 机器码，程序据此判断；error.message 是给人看的中文说明。","http_status":{"400":"参数错误","401":"未登录、令牌失效或 Key 不对","403":"被拒绝","404":"不存在","405":"请求方法不被允许","409":"冲突（如名字已被占用）","413":"太大","502":"存储上游出错","503":"暂时不可用（附 retry-after）"}},"time":"时间为 Unix 毫秒。"},"ops":[{"name":"file_put","title":"上传文件","tag":"files","method":"PUT","path":"/v1/{root}/{path}","auth":"login","mutates":true,"body":"application/octet-stream","description":"请求体就是文件，一次请求最多约 100 MB；同一路径再传就是替换。返回 {path, key, size, readyAt, url}：key 是文件的永久下载凭据，url 是不需要登录的下载地址。","query":[{"name":"type","description":"文件的 Content-Type（不给则用请求头）","schema":{"type":"string"}},{"name":"upload","description":"超过 100 MB 时分几次上传：自定的 32 位十六进制 id，各次相同","schema":{"type":"string"}},{"name":"offset","description":"这一段在文件里的起点（字节）","schema":{"type":"integer"}},{"name":"total","description":"文件总长（字节）","schema":{"type":"integer"}}],"url":"https://fs.disk.zone/v1/{root}/{path}"},{"name":"file_get","title":"下载文件","tag":"files","method":"GET","path":"/v1/{root}/{path}","auth":"login","mutates":false,"description":"返回文件本身，支持 Range。刚上传的文件在分发到 CDN 前返回 425 和 retry-after，稍后再试。","url":"https://fs.disk.zone/v1/{root}/{path}"},{"name":"file_meta","title":"文件记录","tag":"files","method":"GET","path":"/v1/{root}/{path}?meta","auth":"login","mutates":false,"description":"{path, key, size, type, at}。","url":"https://fs.disk.zone/v1/{root}/{path}?meta"},{"name":"file_delete","title":"删除文件","tag":"files","method":"DELETE","path":"/v1/{root}/{path}","auth":"login","mutates":true,"description":"删除这个路径。","url":"https://fs.disk.zone/v1/{root}/{path}"},{"name":"files_list","title":"列出目录","tag":"files","method":"GET","path":"/v1/{root}/{dir}/","auth":"login","mutates":false,"description":"以 / 结尾的路径列出该目录下（含子目录）的文件：{files: [{path, size, type, at}], next}；翻页时把 next 放进 ?after=。","query":[{"name":"limit","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}},{"name":"after","schema":{"type":"string"}}],"url":"https://fs.disk.zone/v1/{root}/{dir}/"},{"name":"file_by_key","title":"按 key 下载","tag":"files","method":"GET","path":"/f/{key}","auth":"none","mutates":false,"description":"不需要登录：拿到 key 就能下载，适合分享和外链。多个 key 用 . 连起来就一次下载它们拼在一起的内容。","url":"https://fs.disk.zone/f/{key}"},{"name":"me","title":"当前账号","tag":"account","method":"GET","path":"/api/me","auth":"login","mutates":false,"description":"{user: {id}}。","url":"https://fs.disk.zone/api/me"},{"name":"roots_list","title":"我的根目录","tag":"roots","method":"GET","path":"/api/roots","auth":"login","mutates":false,"description":"{items: [{name, created}]}。","url":"https://fs.disk.zone/api/roots"},{"name":"root_create","title":"新建根目录","tag":"roots","method":"POST","path":"/api/roots","auth":"login","mutates":true,"description":"新建一个根目录；名字全站唯一，先到先得。","input":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,47}$","description":"1–48 个小写字母、数字、_ 或 -，以字母或数字开头"}},"required":["name"]},"url":"https://fs.disk.zone/api/roots"},{"name":"root_get","title":"一个根目录","tag":"roots","method":"GET","path":"/api/roots/{root}","auth":"login","mutates":false,"description":"{name, created}。","url":"https://fs.disk.zone/api/roots/{root}"},{"name":"root_delete","title":"删除根目录","tag":"roots","method":"DELETE","path":"/api/roots/{root}","auth":"login","mutates":true,"description":"只能删除空的根目录：先删掉里面的文件。","url":"https://fs.disk.zone/api/roots/{root}"},{"name":"health","title":"健康检查","tag":"service","method":"GET","path":"/api/health","auth":"none","mutates":false,"description":"{service, status}。","url":"https://fs.disk.zone/api/health"}]}}