代码拉取完成,页面将自动刷新
同步操作将从 老咸鱼/咸鱼云网盘后端 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
{
"info": {
"_postman_id": "b8e56f77-b8f8-40ea-8288-d2f5a7e6987a",
"name": "咸鱼云Java版",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "12016898"
},
"item": [
{
"name": "账号模块",
"item": [
{
"name": "注册与找回",
"item": [
{
"name": "注册用户",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "user",
"value": "xiaotao233666",
"contentType": "用户名",
"description": "用户名",
"type": "text"
},
{
"key": "passwd",
"value": "123123123",
"contentType": "密码",
"description": "密码",
"type": "text"
},
{
"key": "regcode",
"value": "cjqec",
"contentType": "注册码或邮箱验证码",
"description": "注册邀请码",
"type": "text"
},
{
"key": "email",
"value": "mjt233@qq.com",
"contentType": "邮箱",
"type": "text"
},
{
"key": "validEmail",
"value": "1",
"contentType": "验证邮箱(即通过邮箱验证码方式注册)",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
},
"description": "用户自主注册接口\n\n* URI: `/api/user/`\n* 动作:POST\n \n\n### 请求体参数\n\n* user 用户名\n* passwd 登录密码\n* regcode 注册邀请码,如果是管理员用户请求该接口,则不需要填写邀请码。若使用邮箱注册,该字段则使用邮箱验证码。\n* email 邮箱,邮箱注册方式需要填写这个字段。若使用邀请码方式注册,该字段不会被处理\n* type 用户类型 1 - 管理员,0 - 普通用户,只有当管理员用户调用该字段时才有效\n* validEmail 是否使用邮箱方式注册 true - 是,false - 邀请码注册。使用邮箱方式注册时会验证email字段的有效性"
},
"response": []
},
{
"name": "发送注册验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "email",
"value": "mjt233@qq.com",
"description": "接收邮件的地址",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/regcode",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"regcode"
]
}
},
"response": []
},
{
"name": "发送密码重置验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "account",
"value": "mjt233@qq.com",
"description": "要找回密码的账号的用户名或邮箱",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/sendResetPasswordEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"sendResetPasswordEmail"
]
},
"description": "# 发送密码重置验证码\r\n用于用户忘记密码的情况下,需要重置密码时发送\r\n\r\n- URL: `/api/user/sendResetPasswordEmail`\r\n- 方法:post\r\n\r\n## 表单参数\r\n\r\n- account 要找回密码的账号的用户名或邮箱"
},
"response": []
},
{
"name": "重置密码(忘记密码)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "account",
"value": "mjt233@qq.com",
"description": "被重置的账号的邮箱或用户名",
"type": "text"
},
{
"key": "code",
"value": "123123",
"description": "邮箱验证码",
"type": "text"
},
{
"key": "password",
"value": "123123123123",
"description": "新密码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/resetPassword",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"resetPassword"
]
},
"description": "# 因忘记密码而重置密码\r\n\r\n- URL: `/api/user/resetPassword`\r\n- 方法:post\r\n\r\n## 表单参数\r\n- account 被重置的账号的用户名或账号的邮箱\r\n- code 邮箱验证码\r\n- password 新密码"
},
"response": []
}
]
},
{
"name": "基本操作与基本信息",
"item": [
{
"name": "取用户信息",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "passwd",
"value": "mojintao233",
"type": "text"
},
{
"key": "user",
"value": "xiaotao",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
},
"description": "获取用户信息\r\n- URI: `/api/user/`\r\n- 动作:GET\r\n\r\n### 响应\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"id\": 42,\r\n \"user\": \"xiaotao\",\r\n \"type\": 1, // 1为管理员,0为普通用户\r\n \"quota\": 10 // 私人空间配额(GiB)\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "取用户信息",
"originalRequest": {
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "passwd",
"value": "mojintao233",
"type": "text"
},
{
"key": "user",
"value": "xiaotao",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 25 Dec 2021 13:58:11 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 1,\n \"user\": \"admin\",\n \"type\": 1,\n \"quota\": 10,\n \"email\": \"\"\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "上传用户头像",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "/C:/Users/12079/Desktop/avatar.jpg"
}
]
},
"url": {
"raw": "{{addr}}/api/user/avatar",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"avatar"
]
},
"description": "上传用户头像\r\n- URI: `/api/user/avatar`\r\n- 动作:POST\r\n\r\n### 请求体参数\r\n- file 头像文件"
},
"response": []
},
{
"name": "获取用户头像",
"protocolProfileBehavior": {
"followRedirects": true
},
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/user/avatar/xiaotao",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"avatar",
"xiaotao"
]
},
"description": "获取用户头像\r\n- URI: `/api/user/avatar`或`/api/user/avater/{用户名}`\r\n- 动作:GET\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "获取空间配额使用情况",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/user/quota",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"quota"
]
},
"description": "描述:查询已登录用户的空间配额使用情况 \r\n- URI: `/api/user/quota` \r\n- 动作:GET\r\n\r\n#### 响应data样例 \r\n```json\r\n{\r\n // 单位均为字节(Byte)\r\n \"used\": 114514, // 已用空间\r\n \"quota\": 10737418240 // 总配额\r\n}\r\n```"
},
"response": []
},
{
"name": "修改密码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "old",
"value": "233333",
"type": "text"
},
{
"key": "new",
"value": "123123123",
"type": "text"
},
{
"key": "force",
"value": "true",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/51/passwd",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"51",
"passwd"
]
},
"description": "修改用户的密码\r\n- URI: `/api/user/{uid}/passwd`\r\n- 动作:POST\r\n\r\n### URI参数\r\n- uid 被操作的用户ID(非管理员用户只允许操作自己)\r\n\r\n### 表单参数\r\n- old 旧密码\r\n- new 新密码\r\n- force 强制重置,只允许管理员使用,可无视旧密码直接重置密码"
},
"response": []
},
{
"name": "登录",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let res = JSON.parse(responseBody)\r",
"if (pm.response.code === 200) {\r",
" pm.environment.set(\"token\", res.data)\r",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{addr}}/api/user/token?user=admin&passwd=admin666",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"token"
],
"query": [
{
"key": "user",
"value": "admin"
},
{
"key": "passwd",
"value": "admin666"
}
]
},
"description": "获取token以登录,在后续请求中将此token放于名为`Token`的header字段中实现身份鉴权\r\n- URI: `/api/user/token`\r\n- 动作:POST\r\n\r\n### 参数\r\n- user 用户名\r\n- passwd 密码"
},
"response": []
},
{
"name": "更新token",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "kick",
"value": "false",
"description": "是否踢旧token下线,默认true",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/updateToken",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"updateToken"
]
}
},
"response": []
}
]
},
{
"name": "邮箱改绑",
"item": [
{
"name": "设置绑定新邮箱",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "email",
"value": "mjt233@qq.com",
"description": "要绑定的新邮箱",
"type": "text"
},
{
"key": "originCode",
"value": "axjsz",
"description": "旧邮箱验证码",
"type": "text"
},
{
"key": "newCode",
"value": "asdasd",
"description": "新邮箱验证码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/newMail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"newMail"
]
},
"description": "# 绑定新邮箱之前,\r\n- URL: `/api/user/newMail`\r\n- 方法:post\r\n\r\n## 表单参数\r\n- email 要绑定的新邮箱\r\n- originCode 旧邮箱验证码,若先前未绑定则不需要该参数\r\n- newCode 新邮箱验证码"
},
"response": []
},
{
"name": "发送新邮箱验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "email",
"value": "mjt233@qq.com",
"description": "要绑定的新邮箱",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/sendBindEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"sendBindEmail"
]
},
"description": "# 验证旧邮箱之后,继续验证新邮箱是否有效\r\n- URL: `/api/user/sendBindEmail`\r\n- 方法:post\r\n\r\n## 表单参数\r\n- email 要绑定的新邮箱\r\n\r\n方法调用后会向新邮箱发送验证码。\r\n若新邮箱已在系统中被使用则调用失败。"
},
"response": []
},
{
"name": "发送旧邮箱验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{addr}}/api/user/sendVerifyEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"sendVerifyEmail"
]
},
"description": "# 绑定新邮箱之前,先验证旧邮箱是否有效\r\n- URL: `/api/user/sendVerifyEmail`\r\n- 方法:post\r\n\r\n调用成功后会向用户的邮箱发送验证码。\r\n若用户未设置邮箱则无需调用。"
},
"response": []
},
{
"name": "验证旧邮箱验证码是否正确",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "code",
"value": "123123",
"description": "验证码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/verifyEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"verifyEmail"
]
},
"description": "# 用于校验旧邮箱验证码是否正确\n正确响应200,否则400,该API通常用于在设置绑定新邮箱之前提前对旧邮箱验证码继续校验。\n\n通过后再进行下一步的新邮箱验证\n\n- URL: `/api/user/sendVerifyEmail`\n- 方法:post\n\n调用成功后会向用户的邮箱发送验证码。\n若用户未设置邮箱则无需调用。"
},
"response": []
}
]
}
]
},
{
"name": "系统资源操作",
"item": [
{
"name": "断点续传任务",
"item": [
{
"name": "创建断点续传任务",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/breakpoint?fileName=test.mp4&length=2097153&chunkSize=3024000",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint"
],
"query": [
{
"key": "fileName",
"value": "test.mp4",
"description": "文件名"
},
{
"key": "length",
"value": "2097153",
"description": "文件长度"
},
{
"key": "chunkSize",
"value": "3024000"
}
]
},
"description": "创建断点续传任务\r\n\r\n- URI:`/api/breakpoint/`\r\n- 动作:POST\r\n\r\n### 参数\r\n- fileName - 文件名\r\n- length - 文件长度\r\n\r\n### 响应\r\n创建成功后响应任务信息\r\n```json\r\n{\r\n \"taskId\": \"67ab0bc9-92d0-4b4c-ae22-f9e4b4196bec\", // 任务ID\r\n \"fileName\": \"test.mp4\", // 文件名\r\n \"length\": 2097153, // 文件长度\r\n \"chunkSize\": 2097152, // 每分块长度\r\n \"chunkCount\": 2 // 总分块数量\r\n}\r\n```"
},
"response": []
},
{
"name": "获取任务信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/breakpoint?id=b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint"
],
"query": [
{
"key": "id",
"value": "b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"description": "任务ID"
}
]
},
"description": "获取断点续传任务的详细信息\r\n\r\n- URI:`/api/breakpoint/`\r\n- 动作:GET\r\n\r\n### 参数\r\n- id - 要查询的任务ID\r\n\r\n### 响应\r\n创建成功后响应任务信息\r\n```json\r\n{\r\n \"taskId\": \"67ab0bc9-92d0-4b4c-ae22-f9e4b4196bec\", // 任务ID\r\n \"fileName\": \"test.mp4\", // 文件名\r\n \"length\": 2097153, // 文件长度\r\n \"chunkSize\": 2097152, // 每分块长度\r\n \"chunkCount\": 2 // 总分块数量\r\n}\r\n```"
},
"response": []
},
{
"name": "结束断点续传任务",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/breakpoint?id=b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint"
],
"query": [
{
"key": "id",
"value": "b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"description": "任务ID"
}
]
},
"description": "结束断点续传任务,操作将使服务器释放对应的资源,同时会导致该断点续传任务不再可用\r\n\r\n- URI:`/api/breakpoint/`\r\n- 动作:DELETE\r\n\r\n### 参数:\r\n- id - 要结束的任务ID"
},
"response": []
},
{
"name": "上传文件片段",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "/D:/game/mc/脚本启动.bat"
}
]
},
"url": {
"raw": "{{addr}}/api/breakpoint/9eb03bf5-2d61-4e3d-bb50-6e3179407c1b/1",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint",
"9eb03bf5-2d61-4e3d-bb50-6e3179407c1b",
"1"
]
},
"description": "上传文件片段到断点续传任务\r\n\r\n- URI:`/api/breakpoint/{taskId}/{part}`\r\n- 动作:POST\r\n\r\n### URL参数\r\n- taskId 断点续传任务ID\r\n- part 本次上传的文件块编号,可以使用范围,如:3-6表示这个文件是文件块3,4,5,6的部分"
},
"response": []
}
]
},
{
"name": "解析节点ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/42/path/root",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"42",
"path",
"root"
]
},
"description": "用于将节点ID解析为网盘路径,因为搜索文件接口返回的结果中,只有文件所处的节点ID或节点本身的ID,进一步访问需要得知该资源的网盘路径。\r\n\r\n- URI: `/api/resource/{uid}/path/{nodeId}`\r\n- 动作:GET \r\n\r\n### URI参数\r\n- uid 用户ID \r\n- nodeId 节点ID\r\n\r\n#### 响应\r\n```json\r\n{\r\n \"code\":1,\r\n \"data\": \"/this/is/a/path\",\r\n \"msg\": \"ok\"\r\n}\r\n```"
},
"response": []
},
{
"name": "使用下载码下载文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/fileContentByFDC/eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjoie1wibmFtZVwiOlwicGhvdG8xLnBuZ1wiLFwibWQ1XCI6XCJmZjljMTk4ZTNjZDFkNmU5NDg2OTgzNTU5OTJmMmZjM1wiLFwic2l6ZVwiOjAsXCJ1aWRcIjo0MixcImRpclwiOlwiL2ZvbGRlcjFcIixcInN1ZmZpeFwiOlwicG5nXCJ9IiwiZXhwIjoxNjIwNjYyNjE2LCJpYXQiOjE2MjA1NzYyMTZ9.mSdg9kS4xsStn4g8vUOdJJBv4VcVNWL0TratxkrQ86o",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"fileContentByFDC",
"eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjoie1wibmFtZVwiOlwicGhvdG8xLnBuZ1wiLFwibWQ1XCI6XCJmZjljMTk4ZTNjZDFkNmU5NDg2OTgzNTU5OTJmMmZjM1wiLFwic2l6ZVwiOjAsXCJ1aWRcIjo0MixcImRpclwiOlwiL2ZvbGRlcjFcIixcInN1ZmZpeFwiOlwicG5nXCJ9IiwiZXhwIjoxNjIwNjYyNjE2LCJpYXQiOjE2MjA1NzYyMTZ9.mSdg9kS4xsStn4g8vUOdJJBv4VcVNWL0TratxkrQ86o"
]
},
"description": "用于需要免登录验证而又保护用户认证信息的情况下下载文件,比如 使用外部下载器,分享好友等\r\n\r\n- URI:`/api/resource/0/fileContentByFDC/{下载码}`\r\n- 动作:GET\r\n\r\n下载码通过'获取文件下载码'接口获得\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "获取文件下载码",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{addr}}/api/resource/42/FDC/folder1?md5=ff9c198e3cd1d6e948698355992f2fc3&name=photo1.png",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"42",
"FDC",
"folder1"
],
"query": [
{
"key": "md5",
"value": "ff9c198e3cd1d6e948698355992f2fc3",
"description": "目标文件的MD5(当服务器采用唯一存储方式时,该值必须正确)"
},
{
"key": "name",
"value": "photo1.png",
"description": "目标文件名"
}
]
},
"description": "获取某个文件的下载码,使用下载码可用于免登录在外部工具下载或分享他人 \r\n- URI:`/api/resource/{用户ID}/FDC/{文件所在路径}` \r\n- 动作:GET\r\n\r\n#### 参数列表\r\n- md5: 文件的MD5(当服务器使用原始文件结构存储文件时,该项不起作用)\r\n- name:文件名 \r\n\r\n#### 响应data\r\n- 下载码,用于'使用下载码下载文件'接口"
},
"response": []
},
{
"name": "使用MD5下载文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/50/fileContentByMD5/bd68e6b2312bb88889809df88641bbb0",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"50",
"fileContentByMD5",
"bd68e6b2312bb88889809df88641bbb0"
]
},
"description": "通过文件MD5下载网盘中的文件而无需关注文件位置和所属用户\r\n\r\n- URI:`/api/resource/{uid}/fileContentByMD5/{md5}/{name}`\r\n- 动作:GET\r\n\r\nURI参数:\r\n- uid 用户id,任意int型整数均可,此为占位参数,不起作用但必须传入\r\n- md5 文件md5值\r\n- name 文件名,可选参数,不影响服务器响应。可用于wget等工具方便识别文件名\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "取路径对应节点ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/1/node/我的收集/新建文件夹/新建文件夹133",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"1",
"node",
"我的收集",
"新建文件夹",
"新建文件夹133"
]
},
"description": "# 获取路径途径的所有节点信息\n\n- URL: /api/resource/{uid}/node/{path}\n- 方法: GET\n\n## URL参数\n- uid:用户ID\n- path: 请求的完整路径\n\n## 响应\n```json\n{\n \"code\": 200,\n \"data\": [\n {\n \"name\": \"我的收集\", // 根节点\n \"uid\": 1,\n \"id\": \"84148bb27433475fa86dc5c6df776cba\",\n \"parent\": \"1\",\n \"rootNode\": true\n },\n {\n \"name\": \"新建文件夹\",\n \"uid\": 1,\n \"id\": \"36436ff784c4408a9a1571aeed12456b\",\n \"parent\": \"84148bb27433475fa86dc5c6df776cba\",\n \"rootNode\": false\n },\n {\n \"name\": \"新建文件夹133\", // 最后一级\n \"uid\": 1,\n \"id\": \"e6cfaa1b1c42435a91b5c82bea74c4ee\",\n \"parent\": \"36436ff784c4408a9a1571aeed12456b\",\n \"rootNode\": false\n }\n ],\n \"msg\": \"OK\"\n}\n```"
},
"response": [
{
"name": "取路径对应ID",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/1/node/我的收集/新建文件夹/新建文件夹133",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"1",
"node",
"我的收集",
"新建文件夹",
"新建文件夹133"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 06 Nov 2021 16:54:58 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": [\n {\n \"name\": \"我的收集\",\n \"uid\": 1,\n \"id\": \"84148bb27433475fa86dc5c6df776cba\",\n \"parent\": \"1\",\n \"rootNode\": true\n },\n {\n \"name\": \"新建文件夹\",\n \"uid\": 1,\n \"id\": \"36436ff784c4408a9a1571aeed12456b\",\n \"parent\": \"84148bb27433475fa86dc5c6df776cba\",\n \"rootNode\": false\n },\n {\n \"name\": \"新建文件夹133\",\n \"uid\": 1,\n \"id\": \"e6cfaa1b1c42435a91b5c82bea74c4ee\",\n \"parent\": \"36436ff784c4408a9a1571aeed12456b\",\n \"rootNode\": false\n }\n ],\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取文件资源缩略图",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/thumbnail/6b454d209e535b566c5e211e625afbc0",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"thumbnail",
"6b454d209e535b566c5e211e625afbc0"
]
},
"description": "通过文件MD5获取网盘中文件的缩略图\n\n- URI:`/api/resource/{uid}/thumbnail/{md5}`\n- 动作:GET\n\nURI参数:\n- uid 任意数字均可\n- md5 文件md5值\n\n### 响应\n直接响应缩略图文件"
},
"response": []
},
{
"name": "通用文件资源获取接口",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/get?targetId=3&protocol=share&path=/&name=10.【1】中村由利子 - 火宵の月・テーマ~ピアノソロ.jpg&isThumbnail=true&vid=f56dc279a40f4b3c8e53ddddb9686df0&code=jXeY",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"get"
],
"query": [
{
"key": "targetId",
"value": "3",
"description": "目标资源id"
},
{
"key": "protocol",
"value": "share",
"description": "main-主存储服务,share-文件分享"
},
{
"key": "path",
"value": "/",
"description": "资源所处路径"
},
{
"key": "name",
"value": "10.【1】中村由利子 - 火宵の月・テーマ~ピアノソロ.jpg",
"description": "文件名"
},
{
"key": "isThumbnail",
"value": "true",
"description": "是否为获取缩略图"
},
{
"key": "vid",
"value": "f56dc279a40f4b3c8e53ddddb9686df0",
"description": "文件分享的额外参数-校验id"
},
{
"key": "code",
"value": "jXeY",
"description": "文件分享的额外参数-提取码"
}
]
}
},
"response": []
},
{
"name": "通用文件资源上传接口",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/upload?targetId=0&protocol=main&path=/&name=aaa.jpg&xxx=自定义参数",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"upload"
],
"query": [
{
"key": "targetId",
"value": "0",
"description": "目标资源所有者id"
},
{
"key": "protocol",
"value": "main",
"description": "资源协议"
},
{
"key": "path",
"value": "/",
"description": "文件所在位置"
},
{
"key": "name",
"value": "aaa.jpg",
"description": "文件名"
},
{
"key": "xxx",
"value": "自定义参数",
"description": "其他自定义参数"
}
]
}
},
"response": []
}
]
},
{
"name": "网盘文件操作",
"item": [
{
"name": "基本操作",
"item": [
{
"name": "直接下载网盘文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/42/content/folder1/photo1.png",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"content",
"folder1",
"photo1.png"
]
},
"description": "## 从网盘中获取一个文件内容 \r\n- URI:`/api/diskFile/{uid}/{文件路径}`\r\n- 动作:GET/POST\r\n\r\n要注意的是,使用该接口下载文件需要在header或表单中传递Token,在浏览器中可使用POST提交带Token的表单实现下载\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "取文件列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/0/fileList/byPath/软件工具/网络工具",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"0",
"fileList",
"byPath",
"软件工具",
"网络工具"
]
},
"description": "获取网盘中的文件列表 \r\n- URI:`/api/diskFile/{用户id}/fileList/byPath/{请求的路径} ` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": [\r\n [\r\n {\r\n \"name\": \"网络分析与抓包\",\r\n \"md5\": \"334ca18030b781d171b5b65cf5f42388\",\r\n \"type\": 1,\r\n \"size\": -1,\r\n \"node\": \"ed71dfc52b1cbf4237e69e6333bde461\",\r\n \"created_at\": \"2021-05-08T17:06:01.000+00:00\",\r\n \"formatModified\": \"2021-05-09 01:06:01\",\r\n \"suffix\": \"网络分析与抓包\",\r\n \"dir\": true\r\n }\r\n ],\r\n [\r\n {\r\n \"name\": \"Postman-win64-7.26.0-Setup.exe\",\r\n \"md5\": \"6ad1d3fdfd37f78284ac6a111eaddac2\",\r\n \"type\": 2,\r\n \"size\": 90929760,\r\n \"node\": \"ed71dfc52b1cbf4237e69e6333bde461\",\r\n \"created_at\": \"2021-05-08T17:06:01.000+00:00\",\r\n \"formatModified\": \"2021-05-09 01:06:01\",\r\n \"suffix\": \"exe\",\r\n \"dir\": false\r\n }\r\n ]\r\n ],\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "取文件列表",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/fileList/0",
"host": [
"{{addr}}"
],
"path": [
"api",
"fileList",
"0"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Feb 2021 15:16:03 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 1,\n \"data\": [\n [\n {\n \"name\": \"其他\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601457910295,\n \"file\": false,\n \"suffix\": \"其他\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 17:25:10\"\n },\n {\n \"name\": \"图片资源\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1605077251788,\n \"file\": false,\n \"suffix\": \"图片资源\",\n \"dir\": true,\n \"formatModified\": \"2020-11-11 14:47:31\"\n },\n {\n \"name\": \"安卓APP\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601463156268,\n \"file\": false,\n \"suffix\": \"安卓app\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 18:52:36\"\n },\n {\n \"name\": \"工具软件\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601463281242,\n \"file\": false,\n \"suffix\": \"工具软件\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 18:54:41\"\n },\n {\n \"name\": \"驱动\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601468904893,\n \"file\": false,\n \"suffix\": \"驱动\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 20:28:24\"\n }\n ],\n [\n {\n \"name\": \"autoindex.html\",\n \"size\": 11795,\n \"type\": 2,\n \"lastModified\": 1595249972503,\n \"file\": true,\n \"suffix\": \"html\",\n \"dir\": false,\n \"formatModified\": \"2020-07-20 20:59:32\"\n },\n {\n \"name\": \"web.config\",\n \"size\": 168,\n \"type\": 2,\n \"lastModified\": 1602303497178,\n \"file\": true,\n \"suffix\": \"config\",\n \"dir\": false,\n \"formatModified\": \"2020-10-10 12:18:17\"\n }\n ]\n ],\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "新建文件夹",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "name",
"value": "新建文件夹233",
"description": "文件夹名称",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/42/dir/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"dir",
""
]
},
"description": "在请求的路径下创建文件夹 \r\n- URI: `/api/diskFile/{用户id}/dir/{目标所在路径}`\r\n- 动作:PUT\r\n\r\n\r\n### 参数:\r\n- name 文件夹名称"
},
"response": []
},
{
"name": "删除文件",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"fileName\": [\r\n \"avatar.jpg\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/42/content/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"content",
""
]
},
"description": "对某个目录下的多个文件进行删除 \r\n- URI:`/api/diskFile/{uid}/content/{目标所在路径}` \r\n- 动作:DELETE \r\n\r\n#### 请求体\r\n```json\r\n{\r\n \"fileName\": [\r\n \"avatar.jpg\",\r\n \"otherfile\"\r\n ]\r\n}\r\n```\r\n\r\n#### 响应体\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": 3, // 删除的文件和文件夹总数,若为0则表示没有删除任何数据\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "删除2个文件",
"originalRequest": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"fileName\": [\r\n \"cb85a661e0074edfc2260057807ba16d.jpg\",\r\n \"IMG_20210131_205153_1.jpg\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/resource/1/我的图片",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"1",
"我的图片"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Feb 2021 15:09:37 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 1,\n \"data\": 2,\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "搜索文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/42/fileList/byName/photo?page=1",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"fileList",
"byName",
"photo"
],
"query": [
{
"key": "page",
"value": "1"
}
]
},
"description": "搜索网盘中的文件\r\n- URI:`/api/diskFile/{uid}/fileList/byName/{文件名关键字}` \r\n- 动作:GET\r\n\r\n#### 响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"total\": 2, // 文件总数\r\n \"list\": [\r\n {\r\n \"name\": \"photo1.png\", // 文件名\r\n \"md5\": \"ff9c198e3cd1d6e948698355992f2fc3\", // 文件MD5\r\n \"size\": 889946, // 文件大小(Byte),文件夹为-1\r\n \"parent\": \"folder2\", // 所在文件夹名称\r\n \"node\": \"de1e955ec96bd60c089d60bc05931032\", // 所在文件夹节点ID\r\n \"created_at\": \"2021-05-10T00:17:10.000+00:00\", // 创建日期\r\n \"formatModified\": \"2021-05-10 08:17:10\", // 修改日期\r\n \"suffix\": \"png\", // 后缀名\r\n \"dir\": false // 是否为文件夹\r\n }\r\n ],\r\n \"pageNum\": 1,\r\n \"pageSize\": 10,\r\n \"size\": 2,\r\n \"startRow\": 1,\r\n \"endRow\": 2,\r\n \"pages\": 1,\r\n \"prePage\": 0,\r\n \"nextPage\": 0,\r\n \"isFirstPage\": true,\r\n \"isLastPage\": true,\r\n \"hasPreviousPage\": false,\r\n \"hasNextPage\": false,\r\n \"navigatePages\": 8,\r\n \"navigatepageNums\": [\r\n 1\r\n ],\r\n \"navigateFirstPage\": 1,\r\n \"navigateLastPage\": 1\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "上传文件",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"description": "文件[当使用断点续传时可为空或不使用]",
"type": "file",
"src": [],
"disabled": true
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/1/file?breakpoint_id=4f681cb5-1cfc-4210-869c-63222535718f",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"file"
],
"query": [
{
"key": "breakpoint_id",
"value": "4f681cb5-1cfc-4210-869c-63222535718f"
}
]
},
"description": "将文件上传到网盘,若文件已存在则会覆盖 \n- URI: `/api/diskFile/{用户id}/file/{要上传到的路径}`\n- 动作:PUT \n\n#### QueryString参数\n- breakpoint_id 断点任务ID,当断点续传任务完成后,使用任务ID请求该接口,表示保存\"使用断点续传任务上传文件\"到用户网盘。保存成功后断点续传任务将被销毁\n\n#### body参数:\n- file 类型:文件 当使用断点续传时,可不需要\n注意:请求的路径必须是存在的路径,若不存在需要手动提前创建,否则文件会保存失败\n\n#### 响应data含义\n- 0 - 文件覆盖(同一目录下的同名文件上传导致覆盖)\n- 1 - 新文件上传(上传的文件为新文件)\n- 2 - 文件无修改(同一目录下的同名文件与上传的文件内容相同)"
},
"response": []
},
{
"name": "移动文件",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"target\": \"/folder1\",\r\n \"files\":[\r\n {\r\n \"source\": \"folder2\",\r\n \"target\": \"wow\"\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/42/fromPath/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"fromPath",
""
]
},
"description": "移动多个文件或目录到指定目录下 \r\n- API:`/api/file/move/{用户ID}/{原文件所在路径}` \r\n- 动作:POST\r\n\r\n\r\n\r\n#### 请求体结构\r\n```json\r\n{\r\n \"target\":\"/abcd/\", // 粘贴到的目标目录下\r\n \"files\":[ \r\n {\r\n \"source\":\"文件名\", // 要移动的文件名\r\n \"target\":\"文件名\" // 暂时无用\r\n },\r\n {\r\n \"source\":\"file1\",\r\n \"target\":\"file1\"\r\n }\r\n ]\r\n}\r\n```"
},
"response": []
},
{
"name": "复制文件或目录",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"target\": \"/\",\r\n \"files\":[\r\n {\r\n \"source\": \"folder1\",\r\n \"target\": \"folder2\"\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/42/fromPath/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"fromPath",
""
]
},
"description": "- URI:`/api/diskFile/{用户ID}/fromPath/{原文件所在路径}` \r\n- 动作:POST\r\n\r\n#### 请求体结构\r\n```json\r\n{\r\n \"target\":\"/abcd/\", // 粘贴目录\r\n \"files\":[ // 要操作的文件列表\r\n {\r\n \"source\":\"旧文件名\", // 被复制的文件名\r\n \"target\":\"新文件名\" // 粘贴后的文件名(可重命名)\r\n },\r\n {\r\n \"source\":\"file1\",\r\n \"target\":\"file2\"\r\n }\r\n ]\r\n}\r\n```"
},
"response": []
},
{
"name": "重命名文件或目录",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "oldName",
"value": "photo1.png",
"description": "旧文件名",
"type": "text"
},
{
"key": "newName",
"value": "photo2.png",
"description": "重命名后新文件名",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/42/name/folder1",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"name",
"folder1"
]
},
"description": "- API:`/api/file/rename/{用户ID}/{原文件所在路径}` \r\n- 方法:POST\r\n\r\n### 参数\r\n- oldName 原文件名\r\n- newName 新文件名"
},
"response": []
},
{
"name": "快速保存(秒传)",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/15/quickSave?path=/test233&name=啦啦啦.jpg&md5=123",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"15",
"quickSave"
],
"query": [
{
"key": "path",
"value": "/test233",
"description": "文件要保存到的目录"
},
{
"key": "name",
"value": "啦啦啦.jpg",
"description": "文件名"
},
{
"key": "md5",
"value": "123",
"description": "文件MD5"
}
]
},
"description": "# 快速保存(秒传)\n- url: `/api/diskFile/{uid}/quickSave`\n- 方法:POST\n\n## URL参数\n- uid 目标用户\n\n## 表单参数\n- path 文件要保存到的目录\n- name 文件名\n- md5 文件md5\n\n## 响应\n若响应的消息结构中,code为100则标识快速保存未能命中文件,需要上传文件。\ncode为200则表示快速保存成功。\n\n**注意**\n无论code为100还是200,HTTP响应码均为200,code是响应体中json数据的code"
},
"response": [
{
"name": "快速保存(秒传)",
"originalRequest": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/15/quickSave?path=/test233&name=啦啦啦.jpg&md5=0d73b405e53a03816376da287d995422",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"15",
"quickSave"
],
"query": [
{
"key": "path",
"value": "/test233",
"description": "文件要保存到的目录"
},
{
"key": "name",
"value": "啦啦啦.jpg",
"description": "文件名"
},
{
"key": "md5",
"value": "0d73b405e53a03816376da287d995422",
"description": "文件MD5"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Wed, 19 Jan 2022 15:42:52 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"data\": null,\n \"code\": 200,\n \"msg\": \"ok\"\n}"
},
{
"name": "失败-快速保存(秒传)",
"originalRequest": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/15/quickSave?path=/test233&name=啦啦啦.jpg&md5=123",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"15",
"quickSave"
],
"query": [
{
"key": "path",
"value": "/test233",
"description": "文件要保存到的目录"
},
{
"key": "name",
"value": "啦啦啦.jpg",
"description": "文件名"
},
{
"key": "md5",
"value": "123",
"description": "文件MD5"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Wed, 19 Jan 2022 17:08:06 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"data\": null,\n \"code\": 100,\n \"msg\": \"未命中,请上传\"\n}"
}
]
}
]
},
{
"name": "压缩文件与打包下载",
"item": [
{
"name": "解压压缩包",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "name",
"value": "1.zip",
"description": "压缩文件名称",
"type": "text"
},
{
"key": "dest",
"value": "/unzip",
"description": "要解压到的目标目录",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/1/extractArchive/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"extractArchive",
""
]
},
"description": "# 解压压缩包\r\n- 描述:将压缩包解压到指定目录(目前只支持不带密码的ZIP) \r\n- URL: `/api/diskFile/{uid}/extracArchive/{path}`\r\n- 方法:`POST`\r\n\r\n## URL参数\r\n- uid: 用户ID\r\n- path: 压缩包所在的目录路径,空则表示在根目录\r\n\r\n## body参数(x-www-form-urlencoded或multipart)\r\n- name 压缩包名称\r\n- dest 解压到的目标目录"
},
"response": []
},
{
"name": "创建多文件打包",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/要下载的文件所在目录\",\r\n \"filenames\": [\r\n \"文件1\",\r\n \"文件2\",\r\n \"文件3\",\r\n \"目录或文件都可以\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/1/wrap",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"wrap"
]
},
"description": "# 创建多文件打包下载任务\n创建一个用于打包下载多个文件的标识符\n- URL:`/api/diskFile/{uid}/wrap`\n- 方法:POST\n\n## URL参数\n- uid - 用户ID\n\n## JSON请求体\n```json\n{\n \"source\": \"/要下载的文件所在目录\",\n \"filenames\": [\n \"文件1\",\n \"文件2\",\n \"文件3\",\n \"目录或文件都可以\"\n ]\n}\n```"
},
"response": [
{
"name": "创建多文件打包",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/要下载的文件所在目录\",\r\n \"filenames\": [\r\n \"文件1\",\r\n \"文件2\",\r\n \"文件3\",\r\n \"目录或文件都可以\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/1/wrap",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"wrap"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 14 Dec 2021 15:46:30 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": \"3aac256772834bc7893d04c537d668e2\",\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "下载多文件打包",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/1/wrap/3aac256772834bc7893d04c537d668e2/123.zip",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"wrap",
"3aac256772834bc7893d04c537d668e2",
"123.zip"
]
},
"description": "# 打包下载多个文件\n服务器响应一个未知长度的压缩文件的下载流,打包的内容取决于文件打包码\n\n- URL:`/api/diskFile/0/wrap/{wid}/{alias}`\n- 方法:GET\n\n## URL参数\n- wid 打包码,可通过创建多文件打包接口获取\n- alias 文件资源响应别名(可选,默认“打包下载”+时间戳.zip)"
},
"response": []
},
{
"name": "创建压缩文件",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/被压缩的/文件所在/的目录\",\r\n \"filenames\": [\r\n \"文件1\",\r\n \"文件2\",\r\n \"文件或目录都可以\",\r\n \"数组加加加\"\r\n ],\r\n \"dest\": \"/压缩文件/在/网盘里/保存的/位置.zip\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/1/compress",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"compress"
]
},
"description": "# 直接在网盘上创建一个压缩包\n- URL: `/api/diskFile/{uid}/compress`\n- 方法:POST\n\n## URL参数\n- uid - 资源所属用户ID\n\n## 注意\n接口产生的任务不是异步任务,响应会一直等待到压缩完成\n\n## JSON请求体\n```json\n{\n \"source\": \"/被压缩的/文件所在/的目录\",\n \"filenames\": [\n \"文件1\",\n \"文件2\",\n \"文件或目录都可以\",\n \"数组加加加\"\n ],\n \"dest\": \"/压缩文件/在/网盘里/保存的/位置.zip\"\n}\n```"
},
"response": []
},
{
"name": "创建异步压缩任务",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"sourceUid\": 1,\r\n \"sourcePath\": \"/\",\r\n \"sourceNames\": [\r\n \"文件夹1\"\r\n ],\r\n \"targetUid\": 1,\r\n \"targetFilePath\": \"/test.zip\",\r\n \"archiveParam\": {\r\n \"type\": \"zip\",\r\n \"encoding\": \"gbk\"\r\n },\r\n \"waitExit\": true\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/0/asyncCompress",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"0",
"asyncCompress"
]
}
},
"response": []
}
]
}
]
},
{
"name": "管理员",
"item": [
{
"name": "用户管理",
"item": [
{
"name": "取用户列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/user/list?page=1",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"list"
],
"query": [
{
"key": "page",
"value": "1"
}
]
},
"description": "获取系统中的用户列表信息\r\n- URI:`/api/user/list` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"total\": 3,\r\n \"list\": [\r\n {\r\n \"id\": 49,\r\n \"user\": \"admin\",\r\n \"type\": 1,\r\n \"quota\": 10\r\n },\r\n {\r\n \"id\": 50,\r\n \"user\": \"xiaotao\",\r\n \"type\": 1,\r\n \"quota\": 10\r\n },\r\n {\r\n \"id\": 51,\r\n \"user\": \"test\",\r\n \"type\": 0,\r\n \"quota\": 10\r\n }\r\n ],\r\n \"pageNum\": 1,\r\n \"pageSize\": 10,\r\n \"size\": 3,\r\n \"startRow\": 1,\r\n \"endRow\": 3,\r\n \"pages\": 1,\r\n \"prePage\": 0,\r\n \"nextPage\": 0,\r\n \"isFirstPage\": true,\r\n \"isLastPage\": true,\r\n \"hasPreviousPage\": false,\r\n \"hasNextPage\": false,\r\n \"navigatePages\": 8,\r\n \"navigatepageNums\": [\r\n 1\r\n ],\r\n \"navigateFirstPage\": 1,\r\n \"navigateLastPage\": 1\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "用户授权",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/user/51/type/1",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"51",
"type",
"1"
]
},
"description": "授予或撤销用户的管理员权限\r\n- URI:`/api/user/{uid}/type/{typeCode}` \r\n- 动作:PUT \r\n\r\nURI参数:\r\n- uid 目标用户ID\r\n- typeCode 权限代码,1为设置管理员,0为撤销管理员"
},
"response": []
},
{
"name": "添加用户",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "user",
"value": "wodiu",
"description": "用户名",
"type": "text"
},
{
"key": "passwd",
"value": "wodiu",
"description": "密码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
},
"description": "添加用户\r\n该接口与`用户/注册用户`为同一接口\r\n- URI: `/api/user/`\r\n- 动作:POST\r\n\r\n### 请求体参数\r\n- user 用户名\r\n- passwd 登录密码"
},
"response": []
}
]
},
{
"name": "系统管理",
"item": [
{
"name": "存储管理",
"item": [
{
"name": "切换存储模式",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{addr}}/api/admin/sys/config/STORE_TYPE/UNIQUE",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config",
"STORE_TYPE",
"UNIQUE"
]
},
"description": "切换网盘系统的存储模式 \r\n- URI:`/api/admin/sys/config/STORE_TYPE/{type}` \r\n- 动作:PUT \r\n\r\n注意:\r\n1. 切换过程中将会暂时阻断所有文件相关的接口调用\r\n2. 调用该接口可能会导致正在下载文件的用户连接断开\r\n3. 若切换过程中服务器异常(如程序bug,服务器断电等)导致切换中断,可能会造成数据丢失,请谨慎操作 \r\n\r\nURI参数\r\n- type 可选RAW与UNIQUE\r\n\r\n模式说明\r\n- RAW 原始存储模式,每个用户都使用独立的服务器文件资源,本地的文件名与目录结构与用户网盘文件结构保持一致\r\n - 优点:方便管理员直接通过操作系统的文件操作来查看与更改用户文件\r\n - 缺点:文件的复制,移动耗时长,消耗服务器资源大,相同文件存在多份时,文件冗余占用大\r\n- UNIQUE 唯一存储模式,每个相同的文件在服务器只存储一份,将依据文件散列值进行编配文件结构与文件名\r\n - 优点:几乎零成本的复制和移动,服务器不会存储多个相同文件\r\n - 缺点:可能会占用大量node节点,管理员不方便直接通过操作系统的文件操作来查看与更改用户文件\r\n\r\n切换成功响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": null,\r\n \"msg\": \"ok\"\r\n}\r\n```\r\n\r\n系统当前存储模式与参数相同时的响应示例\r\n```json\r\n{\r\n \"code\": 0,\r\n \"data\": \"UNIQUE\", // 服务器当前存储模式\r\n \"msg\": \"请求被忽略,模式无变化\"\r\n}\r\n```"
},
"response": []
},
{
"name": "获取存储状态",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/store/state",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"store",
"state"
]
},
"description": "获取网盘系统的存储状态 \r\n- URI:`/api/admin/store/state` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"store_type\": \"UNIQUE\", // 存储类型\r\n \"file_count\": 248, // 文件计数\r\n \"dir_count\": 69, // 目录计数\r\n \"real_user_size\": 14678764, // 实际存储的用户文件总大小\r\n \"total_user_size\": 32274467, // 记录的用户文件总大小\r\n \"total_public_size\": 9505370783, // 公共目录总大小\r\n \"store_total_space\": 1000203087872, // 用户数据根所在分区总大小 \r\n \"store_free_space\": 283439636480, // 用户数据根所在分区可用空间大小\r\n \"public_total_space\": 1000203087872, // 公共数据根所在分区总大小 \r\n \"public_free_space\": 283439636480, // 公共数据根所在分区可用空间大小\r\n \"store_root\": \"D:\\\\data\\\\xiaotao\\\\saltedfishcloud\\\\store\", // 用户数据根\r\n \"public_root\": \"D:\\\\pack\", // 公共数据根\r\n \"store_type_switching\": false // 系统是否处于存储切换中状态\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "立即同步",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/store/sync?all=true",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"store",
"sync"
],
"query": [
{
"key": "all",
"value": "true"
}
]
},
"description": "立即同步网盘(默认只同步公共网盘)与本地存储的文件信息\r\n- URI: `/api/admin/store/sync`\r\n- 动作:POST\r\n\r\n### 参数\r\n- all 类型:boolean 说明:是否同步所有私人用户的数据 默认值:false"
},
"response": []
}
]
},
{
"name": "常规设置",
"item": [
{
"name": "代理节点",
"item": [
{
"name": "添加代理节点",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "name",
"value": "local2",
"type": "text"
},
{
"key": "type",
"value": "SOCKS",
"type": "text"
},
{
"key": "address",
"value": "127.0.0.1",
"type": "text"
},
{
"key": "port",
"value": "1",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/admin/sys/proxy",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
]
}
},
"response": []
},
{
"name": "获取所有代理",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/proxy",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
]
}
},
"response": []
},
{
"name": "修改代理节点信息",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{addr}}/api/admin/sys/proxy?proxyName=a&type=HTTP&port=1080&address=127.0.0.1&name=local",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
],
"query": [
{
"key": "proxyName",
"value": "a"
},
{
"key": "type",
"value": "HTTP"
},
{
"key": "port",
"value": "1080"
},
{
"key": "address",
"value": "127.0.0.1"
},
{
"key": "name",
"value": "local"
}
]
}
},
"response": []
},
{
"name": "删除代理节点",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/proxy?proxyName=local2",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
],
"query": [
{
"key": "proxyName",
"value": "local2"
}
]
}
},
"response": []
}
]
},
{
"name": "设置配置项值",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/config/REG_CODE/10241024",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config",
"REG_CODE",
"10241024"
]
},
"description": "设置配置项的值\n- URI:`/api/admin/sys/config/{key}/{value}` \n- 动作:PUT \n\n### URI参数:\n- key 配置项名,可选值见配置表\n- value 要设置的值\n\n### 配置表:\n\n|配置名|说明|\n|-|-|\n|STORE_TYPE|存储类型,可选RAW和UNIQUE,RAW为原始存储,UNIQUE为利用硬链接实现的唯一存储|\n|REG_CODE|注册邀请码|\n|SYNC_DELAY |同步延迟,单位分钟,-1关闭同步功能|\n|ENABLE_EMAIL_REG|是否启用邮件注册功能,TRUE启用,FALSE关闭|\n|ENABLE_REG_CODE|是否启用注册邀请码注册功能,TRUE启用,FALSE关闭|\n|MAIL_PROPERTIES|邮件发信服务器配置,参考MAIL_PROPERTIES结构,注意转化URL编码|\n|TOKEN_SECRET|token安全密钥,修改后会导致所有token失效(影响范围:直链,用户登录状态)|\n|FTP_PROPERTIES|FTP服务配置信息,参考FTP_PROPERTIES结构|\n|VERSION|系统版本,由系统内部维护,切勿手动手动修改|\n\n### MAIL_PROPERTIES结构(JSON格式):\n\n|key|value|\n|-|-|\n|from|发信人地址|\n|alias|发信人别名称呼|\n|reply|发信人的回信地址|\n|protocol|发信协议,目前只测试过stmp|\n|username|发信服务器用户名|\n|password|发信服务器密码|\n|port|发信服务器端口|\n|host|发信服务器主机名|\n\n### FTP_PROPERTIE结构(JSON格式):\n|key|value|\n|-|-|\n|ftpEnable|是否启用FTP|\n|listenAddr|服务监听地址|\n|controlPort|FTP主控制端口|\n|passiveAddr|被动传输地址|\n|passivePort|被动传输端口范围,示例:\"2300\":被动模式仅使用2300做数据端口\"2300-2399\": 指定闭区间端口范围\"2300-\" : 2300开始到往后的所有端口\"2300, 2305, 2400-\": 指定2300,2305和2400开始到往后的所有端口|"
},
"response": []
},
{
"name": "获取所有配置项的值",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/config",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config"
]
},
"description": "获取常规设置选项值\r\n- URI:`/api/admin/sys/config` \r\n- 动作:GET\r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"REG_CODE\": \"10241024\",\r\n \"STORE_TYPE\": \"UNIQUE\",\r\n \"SYNC_DELAY\": \"10\"\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "读取配置项值",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/config/SYNC_DELAY",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config",
"SYNC_DELAY"
]
},
"description": "读取某项配置项值\r\n- URI:`/api/admin/sys/config/{key}` \r\n- 动作:GET\r\n\r\nURI参数:\r\n- key 参数名,可选STORE_TYPE,REG_CODE,SYNC_DELAY"
},
"response": []
},
{
"name": "取所有可用配置项",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/configKeys",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"configKeys"
]
},
"description": "取所有可用的配置项名\r\n- URI:`/api/admin/sys/configKeys` \r\n- 动作:GET\r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": [\r\n \"REG_CODE\",\r\n \"STORE_TYPE\",\r\n \"SYNC_DELAY\"\r\n ],\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "设置邮件发信配置",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"host\": \"your smtp host\",\r\n \"username\": \"your stmp user name\",\r\n \"password\": \"your stmp password\",\r\n \"port\": 25,\r\n \"from\": \"sender from address\",\r\n \"alias\": \"your nick\",\r\n \"reply\": \"reply address\",\r\n \"protocol\": \"smtp\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/admin/sys/mailConfig",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"mailConfig"
]
},
"description": "# 设置系统邮件发信配置\n- API: /api/admin/sys/mailConfig\n- 方法:PUT\n\n## JSON请求体\n```json\n{\n \"host\": \"发信服务器主机名,\n \"username\": \"发信用户名\",\n \"password\": \"发信密码\",\n \"port\": 发信端口,\n \"from\": \"发信人地址\",\n \"alias\": \"发信人别名\",\n \"reply\": \"回信地址\",\n \"protocol\": \"协议,目前只测试过smtp(小写)\"\n}\n```"
},
"response": []
}
]
},
{
"name": "取总览信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/overview",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"overview"
]
},
"description": "获取网盘系统的存储状态 \r\n- URI:`/api/admin/sys/overview` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"store: {\r\n \"store_type\": \"UNIQUE\", // 存储类型\r\n \"file_count\": 248, // 文件计数\r\n \"dir_count\": 69, // 目录计数\r\n \"real_user_size\": 14678764, // 实际存储的用户文件总大小\r\n \"total_user_size\": 32274467, // 记录的用户文件总大小\r\n \"total_public_size\": 9505370783, // 公共目录总大小\r\n \"store_total_space\": 1000203087872, // 用户数据根所在分区总大小 \r\n \"store_free_space\": 283439636480, // 用户数据根所在分区可用空间大小\r\n \"public_total_space\": 1000203087872, // 公共数据根所在分区总大小 \r\n \"public_free_space\": 283439636480, // 公共数据根所在分区可用空间大小\r\n \"store_root\": \"D:\\\\data\\\\xiaotao\\\\saltedfishcloud\\\\store\", // 用户数据根\r\n \"public_root\": \"D:\\\\pack\", // 公共数据根\r\n \"store_type_switching\": false // 系统是否处于存储切换中状态\r\n },\r\n \"invite_reg_code\": 114514,\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "获取所有插件配置",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/listPluginConfig",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"listPluginConfig"
]
}
},
"response": []
},
{
"name": "重启系统",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/restart?withCluster=true",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"restart"
],
"query": [
{
"key": "withCluster",
"value": "true",
"description": "是否重启整个集群,默认缺省为true"
}
]
}
},
"response": []
},
{
"name": "获取系统当前信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/getCurSystemInfo?nodeId=837513836872335360",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"getCurSystemInfo"
],
"query": [
{
"key": "nodeId",
"value": "837513836872335360",
"description": "可选,获取当前节点则不传该参数。节点id可通过/api/cluster/listNodes获取"
}
]
}
},
"response": []
},
{
"name": "列出时间范围系统信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/listSystemInfo?nodeId=837513836872335360",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"listSystemInfo"
],
"query": [
{
"key": "nodeId",
"value": "837513836872335360",
"description": "可选,获取当前节点则不传该参数。节点id可通过/api/cluster/listNodes获取"
}
]
}
},
"response": []
}
]
},
{
"name": "开发调试接口",
"item": [
{
"name": "切换只读级别",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "level",
"value": "null",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/admin/debug/readOnly",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"debug",
"readOnly"
]
},
"description": "设置系统的只读状态,用于只读状态下各接口的工作情况 \r\n\r\n该状态一般在切换存储模式执行过程中为null\r\n\r\n该状态仅在运行时有效\r\n- URI:`/api/admin/debug/readOnly` \r\n- 动作:PUT \r\n\r\n参数:\r\n- level 只读级别,可选DATA_MOVING,DATA_CHECKING,和null。为null时表示关闭只读模式 \r\n\r\n当系统处于任意一种只读级别(null除外)时,无法切换到另一种只读级别,必须要先切换到null后才可切换到另一个级别"
},
"response": []
},
{
"name": "获取只读级别",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{addr}}/api/admin/debug/readOnly",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"debug",
"readOnly"
]
},
"description": "获取系统当前的只读级别\r\n- URI:`/api/admin/debug/readOnly` \r\n- 动作:GET"
},
"response": []
},
{
"name": "获取开发者选项值",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/debug/options",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"debug",
"options"
]
},
"description": "获取系统开发者选项值\r\n- URI:`/api/admin/debug/options` \r\n- 动作:GET\r\n\r\n响应样例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"read_only_level\": null, // 系统阻塞级别\r\n \"sync_delay\": 5 // 公共网盘同步延迟\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
}
]
},
{
"name": "插件管理",
"item": [
{
"name": "获取插件列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/getAllPlugins",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"getAllPlugins"
]
}
},
"response": []
}
]
},
{
"name": "集群管理",
"item": [
{
"name": "获取节点列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/cluster/listNodes",
"host": [
"{{addr}}"
],
"path": [
"api",
"cluster",
"listNodes"
]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "任务",
"item": [
{
"name": "获取任务日志",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/asyncTask/getLog?taskId=848042512181362688",
"host": [
"{{addr}}"
],
"path": [
"api",
"asyncTask",
"getLog"
],
"query": [
{
"key": "taskId",
"value": "848042512181362688"
}
]
}
},
"response": []
},
{
"name": "中断任务",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/asyncTask/interrupt?taskId=1111",
"host": [
"{{addr}}"
],
"path": [
"api",
"asyncTask",
"interrupt"
],
"query": [
{
"key": "taskId",
"value": "1111",
"description": "任务id"
}
]
}
},
"response": []
}
]
},
{
"name": "文件收集",
"item": [
{
"name": "创建收集",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"title\": \"测试收集233\",\r\n \"expiredAt\": 1636033051000,\r\n \"saveNode\": \"1\",\r\n \"pattern\": \"[${__ext__}]${name}-${class}.${__ext__}\",\r\n \"extPattern\": \"^pdf$\",\r\n \"allowMax\": 5,\r\n \"maxSize\": -1,\r\n \"nickname\": \"啦啦啦\",\r\n \"field\": [\r\n {\r\n \"name\": \"name\",\r\n \"type\": \"TEXT\",\r\n \"value\": \"田所浩二先辈\",\r\n \"describe\": \"这里输入你的姓名\",\r\n \"pattern\": \"先辈$\"\r\n },\r\n {\r\n \"name\": \"class\",\r\n \"type\": \"OPTION\",\r\n \"value\": \"红茶工艺1班\",\r\n \"describe\": \"请选择你的班级\",\r\n \"options\": [\"红茶工艺1班\", \"红茶工艺2班\"]\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/collection",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection"
]
},
"description": "# 创建一个收集任务\n- 请求方法:POST\n- URL:`/api/collection`\n\n## JSON请求体: \n```JSON\n{\n \"title\": \"测试收集233\", // 收集标题,必填\n \"expiredAt\": 1635856841000, // 收集任务到期时间,必填\n \"saveNode\": \"1\", // 收集到的文件保存节点,必填。注意:是文件夹对应的节点ID,不是保存路径\n \"nickname\": \"啦啦啦\", // 接收者署名,必填,可以自行使用用户名作为默认值\n ”extPattern\": \"^(doc|docx)$\", // 文件拓展名正则表达式,只有符合该表达式的文件后缀名才可被接受。必填。\n \"pattern\": \"asdasd\", // 匹配文件的表达式,可以是正则或字段拼接语法。默认为空\n \"allowMax\": 233, // 允许接收的最大文件数,默认为100\n \"maxSize\": 114514, // 文件最大大小,单位Byte,默认为128MiB\n \"allowAnonymous\": true // 是否允许匿名游客上传,默认为true,\n \"field\": [ // 参数字段数组,可为空\n {\n \"name\": \"姓名\", // 字段名,必填\n \"type\": \"TEXT\", // 类型,可选TEXT或OPTION,大小写敏感,必填\n \"value\": \"田所浩二\", // 默认值,可为空\n \"describe\": \"这里输入你的姓名\", // 额外描述,可为空\n \"pattern\": \"\", // 字段值需要匹配的正则表达式,可为空\n },\n {\n \"name\": \"class\",\n \"type\": \"OPTION\",\n \"value\": \"红茶工艺1班\",\n \"describe\": \"请选择你的班级\",\n \"pattern\": \"\",\n \"options\": [\"红茶工艺1班\", \"红茶工艺2班\"] // 候选项,仅当type为OPTION时有效\n },\n ]\n}\n```\n\n## JSON响应体\n```JSON\n{\n \"code\": 200, // 状态码\n \"data\": {\n \"id\": 1, // 收集ID\n \"verification\":\" 99d15046df774fccad7b2aee16aaffd3\", // 校验码\n \"msg\": \"OK\"\n}\n```\n\n## 表达式pattern说明\n收集任务文件名的表达式只支持正则表达式和字段拼接表达式二选其一,不可混用。 \n当请求体参数中pattern和field均不为空时视为使用字段拼接表达式。 \n当pattern不为空,field为空时,表示用户自主进行文件命名,且命名需要符合pattern正则表达式 \n当field不为空,pattern必须也不为空。 \n\n### 字段拼接表达式\n在表达式中可使用字段变量,如存在字段name,class,使用以下表达式: \n`${name}-${class}-第1周作业.${__ext__}` \n最终可拼接为:田所浩二-红茶工艺1班-第1周作业.docx \n其中`__ext__`是特殊的的变量,表示用户上传的文件拓展名"
},
"response": [
{
"name": "创建收集",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"title\": \"测试收集233\",\r\n \"expiredAt\": 1636033051000,\r\n \"saveNode\": \"1\",\r\n \"pattern\": \"[${__ext__}]${name}-${class}.${__ext__}\",\r\n \"extPattern\": \"^pdf$\",\r\n \"allowMax\": 5,\r\n \"maxSize\": -1,\r\n \"nickname\": \"啦啦啦\",\r\n \"field\": [\r\n {\r\n \"name\": \"name\",\r\n \"type\": \"TEXT\",\r\n \"value\": \"田所浩二先辈\",\r\n \"describe\": \"这里输入你的姓名\",\r\n \"pattern\": \"先辈$\"\r\n },\r\n {\r\n \"name\": \"class\",\r\n \"type\": \"OPTION\",\r\n \"value\": \"红茶工艺1班\",\r\n \"describe\": \"请选择你的班级\",\r\n \"options\": [\"红茶工艺1班\", \"红茶工艺2班\"]\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/collection",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Thu, 04 Nov 2021 08:41:41 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 3,\n \"verification\": \"fa808622494f40908d70650bac760080\"\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "取当前登录用户创建的收集",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection"
]
}
},
"response": []
},
{
"name": "查询收集任务信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/3/fa808622494f40908d70650bac760080",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"3",
"fa808622494f40908d70650bac760080"
]
},
"description": "# 查询收集任务信息\n若任务的allowAnonymous为false,未登录用户请求则会响应401错误\n## 请求说明\n- 请求方法:GET\n- URL:`/api/collection/{cid}/{verification}`\n\n### URL参数 \n- cid: 收集任务ID,必填\n- verification: 收集任务校验码,必填"
},
"response": [
{
"name": "查询收集任务信息",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/3/fa808622494f40908d70650bac760080",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"3",
"fa808622494f40908d70650bac760080"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Thu, 04 Nov 2021 08:44:49 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"id\": 3,\n \"verification\": \"fa808622494f40908d70650bac760080\",\n \"uid\": 1,\n \"nickname\": \"啦啦啦\",\n \"describe\": null,\n \"title\": \"测试收集233\",\n \"maxSize\": -1,\n \"allowAnonymous\": true,\n \"allowMax\": 5,\n \"pattern\": \"[${__ext__}]${name}-${class}.${__ext__}\",\n \"extPattern\": \"^pdf$\",\n \"field\": [\n {\n \"name\": \"name\",\n \"type\": \"TEXT\",\n \"value\": \"田所浩二先辈\",\n \"describe\": \"这里输入你的姓名\",\n \"pattern\": \"先辈$\"\n },\n {\n \"name\": \"class\",\n \"type\": \"OPTION\",\n \"value\": \"红茶工艺1班\",\n \"describe\": \"请选择你的班级\",\n \"options\": [\n \"红茶工艺1班\",\n \"红茶工艺2班\"\n ]\n }\n ],\n \"saveNode\": \"1\",\n \"expiredAt\": \"2021-11-04T13:37:31.000+00:00\",\n \"available\": 1,\n \"createdAt\": \"2021-11-04T08:41:41.000+00:00\",\n \"state\": \"CLOSED\"\n}"
}
]
},
{
"name": "提交文件",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "submitInfo",
"value": "{\n\"filename\":\"a.pdf\",\n\"field\": [\n {\n \"name\": \"name\",\n \"value\": \"李田所先辈\"\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}",
"contentType": "application/json",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": []
}
]
},
"url": {
"raw": "{{addr}}/api/collection/4/00a753981004459599a13ae718df7612",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"4",
"00a753981004459599a13ae718df7612"
]
},
"description": "# 提交一个文件到收集\n- URL:/api/collection/{cid}/{verification}\n- 方法:POST\n\n## URL参数\n- cid: 收集ID\n- verification: 收集任务校验码\n\n## 表单参数\n- submitInfo: 提交信息,json格式,详见[submitInfo对象](#submitInfo)\n- file: 文件本体\n\n\n### submitInfo对象\n<span id=\"submitInfo\"></span>\n```JSON\n{\n\"filename\": \"a.pdf\", // 提供的文件名,必填\n\"field\": [ // 提供的字段信息(如果有的话)\n {\n \"name\": \"name\", // 字段名\n \"value\": \"李田所先辈\" // 字段值\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}\n```"
},
"response": [
{
"name": "提交文件",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "submitInfo",
"value": "{\n\"filename\":\"a.pdf\",\n\"field\": [\n {\n \"name\": \"name\",\n \"value\": \"李田所先辈\"\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}",
"contentType": "application/json",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": []
}
],
"options": {
"raw": {
"language": "text"
}
}
},
"url": {
"raw": "{{addr}}/api/collection/4/00a753981004459599a13ae718df7612",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"4",
"00a753981004459599a13ae718df7612"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Thu, 04 Nov 2021 08:45:12 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": null,\n \"msg\": \"OK\"\n}"
},
{
"name": "字段不符合约束",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "submitInfo",
"value": "{\n\"filename\":\"a.pdf\",\n\"field\": [\n {\n \"name\": \"name\",\n \"value\": \"李田所先辈123\"\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}",
"contentType": "application/json",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": "/D:/data/xiaotao/吉他谱/cry for the moon.pdf"
}
],
"options": {
"raw": {
"language": "text"
}
}
},
"url": {
"raw": "{{addr}}/api/collection/3/8921d0d81c0f459584f4c50856874906",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"3",
"8921d0d81c0f459584f4c50856874906"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Wed, 03 Nov 2021 16:31:22 GMT"
},
{
"key": "Connection",
"value": "close"
}
],
"cookie": [],
"body": "{\n \"code\": 400,\n \"data\": null,\n \"msg\": \"不满足约束条件:字段name的值不满足正则表达式约束:先辈$\"\n}"
}
]
},
{
"name": "删除收集",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/2",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"2"
]
},
"description": "# 删除收集\n- URL:/api/collection/{cid}\n- 方法:DELETE\n- 权限:只允许创建者删除\n## URL参数\n- cid: 收集ID"
},
"response": []
},
{
"name": "查询收集记录",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/record/5?page=1&size=5",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"record",
"5"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "5"
}
]
},
"description": "# 查询收集提交记录\n- URL:/api/collection/record/{uid}\n- 方法: GET\n- 权限:只允许创建者查询\n\n## QueryString参数\n- page:查询的页码,默认为1,最小为1\n- size:每页的大小,默认为10,最小为5\n\n## 响应样例:\n```json\n{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 3,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:33:57.000+00:00\"\n },\n {\n \"id\": 4,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:34:26.000+00:00\"\n },\n {\n \"id\": 5,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:05.000+00:00\"\n },\n {\n \"id\": 6,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:39.000+00:00\"\n },\n {\n \"id\": 7,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:40.000+00:00\"\n }\n ],\n \"totalCount\": 5,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}\n```"
},
"response": [
{
"name": "查询收集记录",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/record/5?page=1&size=5",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"record",
"5"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "5"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Fri, 05 Nov 2021 06:27:20 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 3,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:33:57.000+00:00\"\n },\n {\n \"id\": 4,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:34:26.000+00:00\"\n },\n {\n \"id\": 5,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:05.000+00:00\"\n },\n {\n \"id\": 6,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:39.000+00:00\"\n },\n {\n \"id\": 7,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:40.000+00:00\"\n }\n ],\n \"totalCount\": 5,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "设置收集状态",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/2/state/OPEN",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"2",
"state",
"OPEN"
]
},
"description": "# 设置收集状态\n- URL: /api/collection/{cid}/state/{state}\n- 方法:DELETE\n\n## URL参数\n- cid - 要操作的收集ID\n- state - 设置的状态,可选OPEN或CLOSED\n\n## 注意事项\n- 因时间过期导致的收集自动关闭时,会在一分钟内被自动关闭,且在开启期间提交的文件也会无法通过时间约束校验\n- 因收集数量限制满导致的关闭时,再对其进行开启操作后,提交的文件仍无法通过数量约束校验"
},
"response": []
}
]
},
{
"name": "文件分享",
"item": [
{
"name": "创建分享",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"path\": \"/\",\r\n \"expiredAt\": null,\r\n \"name\": \"我的收集\",\r\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share",
"host": [
"{{addr}}"
],
"path": [
"api",
"share"
]
},
"description": "# 创建分享\n- URL: /api/share\n- 方法:POST\n\n## 请求示例\n```json\n{\n \"path\": \"/\", // 资源所在的目录\n \"expiredAt\": 1637072638000, // 分享到期时间,可以为null或缺少该字段表示永不过期\n \"name\": \"我的收集\", // 文件或目录的名称\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"// 资源提取码,最大16个字符,可以为null或缺少该字段表示不需要提取码\n}\n```\n\n## 响应字段含义\n|字段名|含义|\n|-|-|\n|id|分享id|\n|uid|创建者ID|\n|nid|资源所在节点id|\n|parentId|资源所在的节点的父节点ID|\n|verification|分享校验码,一般与分享id一同使用用于定位一个具体的分享|\n|type|分享类型,可为DIR或FILE|\n|extractCode|提取码|\n|name|分享的资源名称|\n|created_at|创建日期|\n|expired_at|过期日期|"
},
"response": [
{
"name": "创建分享",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"path\": \"/\",\r\n \"expiredAt\": 1639647653000,\r\n \"name\": \"我的收集\",\r\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share",
"host": [
"{{addr}}"
],
"path": [
"api",
"share"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 02:37:26 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 7,\n \"uid\": 1,\n \"nid\": \"1\",\n \"parentId\": \"1\",\n \"verification\": \"03e53fcba25546e1ae1da180e13d0263\",\n \"size\": -1,\n \"type\": \"DIR\",\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T10:06:16.619+00:00\",\n \"expiredAt\": \"2021-12-16T09:40:53.000+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
},
{
"name": "有效期无限制的分享",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"path\": \"/\",\r\n \"expiredAt\": null,\r\n \"name\": \"我的收集\",\r\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share",
"host": [
"{{addr}}"
],
"path": [
"api",
"share"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 02:09:16 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 6,\n \"uid\": 1,\n \"nid\": \"1\",\n \"parentId\": \"1\",\n \"verification\": \"f9dd9fdd8a0d490f8ea7b6f21ed63fb3\",\n \"size\": -1,\n \"type\": \"DIR\",\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T10:05:32.842+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取创建的分享列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/user/1?page=1&size=10",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"user",
"1"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "10"
}
]
},
"description": "# 获取创建的分享列表\n- URL: /api/share/user/{uid}\n- 方法:GET\n\n## URL参数\n- uid 请求的用户ID(可选,留空则表示使用当前登录的用户id)当未指定uid时,可获取所有分享的verification验证码\n\n## 响应\n当查看指定用户的分享列表时,verification和extractCode字段会被隐藏"
},
"response": [
{
"name": "获取已登录用户的分享列表",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/user?page=1&size=10",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"user"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "10"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Nov 2021 16:04:40 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 7,\n \"uid\": 1,\n \"nid\": \"28e9694a3133f1b421ce5d420290fdc1\",\n \"parentId\": \"1\",\n \"verification\": \"78add3df39634e17af3ccc7e7dfee13b\",\n \"size\": 463922,\n \"type\": \"FILE\",\n \"name\": \"0065tQdely1fz45l6q9m0j31ao0t6h01.jpg\",\n \"createdAt\": \"2021-11-18T05:30:24.000+00:00\",\n \"expiredAt\": \"2021-11-19T05:30:24.000+00:00\",\n \"validateSuccess\": true,\n \"expired\": false,\n \"needExtractCode\": false\n },\n {\n \"id\": 8,\n \"uid\": 1,\n \"nid\": \"1hzcp014kc33tgxs21cezk6u82xcasd\",\n \"parentId\": \"1\",\n \"verification\": \"78add3df39634e17af3ccc7e7dfee13b\",\n \"size\": 463922,\n \"type\": \"FILE\",\n \"name\": \"0065tQdely1fz45l6q9m0j31ao0t6h01.jpg\",\n \"createdAt\": \"2021-11-18T05:30:24.000+00:00\",\n \"expiredAt\": \"2021-11-19T05:30:24.000+00:00\",\n \"validateSuccess\": true,\n \"expired\": false,\n \"needExtractCode\": false\n }\n ],\n \"totalCount\": 2,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}"
},
{
"name": "获取指定用户的分享列表",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/user/1?page=1&size=10",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"user",
"1"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "10"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 03:16:55 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 2,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:57.000+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n },\n {\n \"id\": 1,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:55.000+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n }\n ],\n \"totalCount\": 2,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取分享资源的基本信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/1/9391bb58cc9447fe81ef563eaa45629e?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"1",
"9391bb58cc9447fe81ef563eaa45629e"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
},
"description": "# 获取分享资源的基本信息\n- URL: /api/share/{sid}/{verification}\n- 方法:GET\n\n## URL参数\n- sid 分享ID\n- verification 分享校验码\n\n## QueryString参数\n- code 提取码(可选)\n\n## 响应\n- 若分享已过期,则HTTP响应码为非200,且在msg字段提供错误内容\n- 若分享需要使用提取码,提取码不正确或未提供时,validateSuccess字段为false"
},
"response": [
{
"name": "未提供提取码",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/1/9391bb58cc9447fe81ef563eaa45629e",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"1",
"9391bb58cc9447fe81ef563eaa45629e"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"disabled": true
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 01:57:06 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n\n \"id\": 2,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:57.000+00:00\",\n \"validateSuccess\": false,\n \"username\": \"admin\",\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
},
{
"name": "提供提取码",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/1/9391bb58cc9447fe81ef563eaa45629e?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"1",
"9391bb58cc9447fe81ef563eaa45629e"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 01:54:47 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 2,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:57.000+00:00\",\n \"validateSuccess\": true,\n \"username\": \"admin\",\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "浏览分享目录",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/view/3/b4047afcaf7e4e7fb16ff086916beefd/我的收集/123?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"view",
"3",
"b4047afcaf7e4e7fb16ff086916beefd",
"我的收集",
"123"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
},
"description": "# 浏览分享目录\n- URL:/api/share/view/{sid}/{verification}/{path}\n- 方法:GET\n\n## URL参数\n- sid 分享ID\n- verification 分享校验码\n- path 要浏览的路径\n\n## QueryString参数\n- code 资源提取码,可选。当分享的资源要求提取码的时候,需要提供该参数\n\n## 注意\n仅可用于目录(DIR)类型的分享\n\n## 响应说明\n```json\n{\n \"code\": 200,\n \"data\": [\n [], // 目录信息列表\n [ // 文件信息列表\n {\n \"name\": \"Vegas_Pro_13.0-64bit(Build453)特别版汉化包_2.zip\",\n \"md5\": \"a9365e3bb386d26d2e71511dcf06279a\",\n \"type\": 2,\n \"size\": 39233182,\n \"uid\": 1,\n \"node\": \"a7b752307ce247adb3b5481a242cc2da\",\n \"created_at\": \"2021-11-15T02:31:15.000+00:00\",\n \"formatModified\": \"2021-11-15 10:31:15\",\n \"suffix\": \"zip\",\n \"dir\": false\n }\n ] \n ],\n \"msg\": \"OK\"\n}\n```"
},
"response": [
{
"name": "浏览分享目录",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/view/3/b4047afcaf7e4e7fb16ff086916beefd/我的收集/123?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"view",
"3",
"b4047afcaf7e4e7fb16ff086916beefd",
"我的收集",
"123"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Nov 2021 18:22:28 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": [\n [],\n [\n {\n \"name\": \"Vegas_Pro_13.0-64bit(Build453)特别版汉化包_2.zip\",\n \"md5\": \"a9365e3bb386d26d2e71511dcf06279a\",\n \"type\": 2,\n \"size\": 39233182,\n \"uid\": 1,\n \"node\": \"a7b752307ce247adb3b5481a242cc2da\",\n \"created_at\": \"2021-11-15T02:31:15.000+00:00\",\n \"formatModified\": \"2021-11-15 10:31:15\",\n \"suffix\": \"zip\",\n \"dir\": false\n },\n {\n \"name\": \"package-lock.json\",\n \"md5\": \"a9c39ca9ce7e935100cc62fb5cd1a431\",\n \"type\": 2,\n \"size\": 157858,\n \"uid\": 1,\n \"node\": \"a7b752307ce247adb3b5481a242cc2da\",\n \"created_at\": \"2021-11-15T02:32:01.000+00:00\",\n \"formatModified\": \"2021-11-15 10:32:01\",\n \"suffix\": \"json\",\n \"dir\": false\n }\n ]\n ],\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取分享的文件内容",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/resource?sid=4&verification=24f72153403c4fff9cec8e6cd7f6658a&code=114514&path=/我的收集/123&name=1.jpg",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"resource"
],
"query": [
{
"key": "sid",
"value": "4",
"description": "分享ID"
},
{
"key": "verification",
"value": "24f72153403c4fff9cec8e6cd7f6658a",
"description": "分享校验码"
},
{
"key": "code",
"value": "114514",
"description": "提取码(如果有则需要提供)"
},
{
"key": "path",
"value": "/我的收集/123",
"description": "要获取的目标文件所在的目录路径(该参数仅当分享类型为DIR时有意义)"
},
{
"key": "name",
"value": "1.jpg",
"description": "文件名(该参数仅当分享类型为DIR时有意义)"
}
]
},
"description": "# 获取分享的文件内容\n调用成功后将直接响应文件本体\n\n- URL: /api/share/resource/\n\n## QueryString参数\n- sid 分享ID\n- verification 分享校验码\n- code 提取码(如果有需要)\n- path 要获取的目标文件所在路径\n- name 文件名\n\n注意:path与name仅当分享类型为目录时有意义"
},
"response": []
},
{
"name": "取消分享",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/share/-1",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"-1"
]
},
"description": "# 取消共享\n- URL: /api/share/{sid}\n- 方法:DELETE\n\n## URL参数\n- sid 分享ID\n\n## 注意\n删除的分享的创建者必须是当前登录用户,否则权限不足"
},
"response": [
{
"name": "分享不存在",
"originalRequest": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/share/-1",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"-1"
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 04:24:10 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 404,\n \"data\": null,\n \"msg\": \"分享不存在\"\n}"
},
{
"name": "取消分享",
"originalRequest": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/share/2",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"2"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 04:23:59 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": null,\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "创建多文件打包",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/\",\r\n \"filenames\": [\r\n \"子目录\",\r\n \"文件1.xlsx\",\r\n \"文件2.xlsx\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share/wrap/2/4d9c801dd01145a3a4a9c55d0b30b74f?code",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"wrap",
"2",
"4d9c801dd01145a3a4a9c55d0b30b74f"
],
"query": [
{
"key": "code",
"value": "",
"description": "提取码,没有则留空"
}
]
},
"description": "# 创建多文件打包\r\n创建一个来自目录分享的打包码,在文件模块的打包下载中使用这个打包码即可下载分享打包的内容\r\n\r\n- URL: `/api/share/wrap/{wid}/{verification}`\r\n- 方法:`POST`\r\n\r\n### url参数\r\n- wid - 分享ID\r\n- verification - 分享校验码\r\n\r\n### QueryString参数\r\n- code - 提取码,没有可留空留\r\n\r\n### Body\r\n```json\r\n{\r\n \"source\": \"/文件/所在/的目录\",\r\n \"filenames\": [\r\n \"文件名数组\", // 注意:创建打包时不会对文件名是否存在进行校验,若传递了不存在的文件名,下载时会报错\r\n \"子目录1\",\r\n \"文件1.xlsx\",\r\n \"文件2.xlsx\"\r\n ]\r\n}\r\n```\r\n\r\n### 响应\r\n```json\r\n{\r\n \"code\": 200,\r\n \"data\": \"546bcea5900140a4bc56acdde1cd5bd7\", // 打包码\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "创建多文件打包",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/\",\r\n \"filenames\": [\r\n \"子目录\",\r\n \"文件1.xlsx\",\r\n \"文件2.xlsx\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share/wrap/2/4d9c801dd01145a3a4a9c55d0b30b74f?code",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"wrap",
"2",
"4d9c801dd01145a3a4a9c55d0b30b74f"
],
"query": [
{
"key": "code",
"value": null,
"description": "提取码,没有则留空"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 18 Dec 2021 16:32:37 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": \"546bcea5900140a4bc56acdde1cd5bd7\",\n \"msg\": \"OK\"\n}"
}
]
}
]
},
{
"name": "插件模块",
"item": [
{
"name": "插件管理",
"item": [
{
"name": "获取插件资源文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/sys/resource/test.txt",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"sys",
"resource",
"test.txt"
]
},
"description": "获取插件的静态资源文件\n\n* URI: `/api/plugin/{插件名}/resource/{资源路径}`\n* 动作:GET\n \n\n直接响应文件二进制内容,或404\n\n示例:\n\n获取插件sys的资源文件test.txt,则URL为:\n\n`/api/plugin/sys/resource/test.txt`"
},
"response": []
},
{
"name": "获取需要自动加载的资源",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/listPluginAutoLoadList",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"listPluginAutoLoadList"
]
},
"description": "列出所有autoLoad不为空的插件列表,前端可以根据这个列表选择加载这些资源实现前端部分的动态拓展"
},
"response": []
},
{
"name": "插件需要加载的js",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/autoLoad.js",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"autoLoad.js"
]
}
},
"response": []
},
{
"name": "插件需要加载的css",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/autoLoad.css",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"autoLoad.css"
]
}
},
"response": []
},
{
"name": "获取所有可用插件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/listAvailablePlugins",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"listAvailablePlugins"
]
}
},
"response": []
},
{
"name": "删除插件",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/deletePlugin?name=samba-store",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"deletePlugin"
],
"query": [
{
"key": "name",
"value": "samba-store"
}
]
}
},
"response": []
}
]
},
{
"name": "视频插件",
"item": [
{
"name": "获取视频信息",
"request": {
"method": "GET",
"header": []
},
"response": []
},
{
"name": "获取视频字幕内容",
"request": {
"method": "GET",
"header": []
},
"response": []
},
{
"name": "获取编码转换任务列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/video/listConvertTask?uid=1&status=1&page=0",
"host": [
"{{addr}}"
],
"path": [
"api",
"video",
"listConvertTask"
],
"query": [
{
"key": "uid",
"value": "1"
},
{
"key": "status",
"value": "1"
},
{
"key": "page",
"value": "0",
"description": "首页为0"
}
]
}
},
"response": []
}
]
}
]
},
{
"name": "挂载点",
"item": [
{
"name": "添加挂载点",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\":\"挂载点测试32332\",\r\n \"nid\": \"1\",\r\n \"uid\": 1,\r\n \"protocol\": \"local\",\r\n \"params\": \"{\\\"path\\\":\\\"store\\\"}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/mountPoint/setMountPoint",
"host": [
"{{addr}}"
],
"path": [
"api",
"mountPoint",
"setMountPoint"
]
}
},
"response": []
},
{
"name": "根据id获取挂载点信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/mountPoint/getById?id=787131762953158656",
"host": [
"{{addr}}"
],
"path": [
"api",
"mountPoint",
"getById"
],
"query": [
{
"key": "id",
"value": "787131762953158656"
}
]
}
},
"response": [
{
"name": "根据id获取挂载点信息",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/mountPoint/getById?id=787131762953158656",
"host": [
"{{addr}}"
],
"path": [
"api",
"mountPoint",
"getById"
],
"query": [
{
"key": "id",
"value": "787131762953158656"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 19 Nov 2022 15:22:11 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"msg\": \"OK\",\n \"data\": {\n \"id\": \"787131762953158656\",\n \"uid\": \"0\",\n \"nid\": \"0\",\n \"protocol\": \"hdfs\",\n \"params\": \"{\\\"url\\\":\\\"hdfs://localhost:9000\\\",\\\"root\\\":\\\"/xyy\\\",\\\"user\\\":\\\"xiaotao\\\"}\",\n \"name\": \"hadoop\",\n \"createAt\": \"2022-11-07T15:01:42.000+00:00\",\n \"path\": null,\n \"parentPath\": null\n },\n \"code\": 200\n}"
}
]
}
]
},
{
"name": "桌面小组件",
"item": [
{
"name": "获取可配置组件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/desktop/listAllComponent",
"host": [
"{{addr}}"
],
"path": [
"api",
"desktop",
"listAllComponent"
]
}
},
"response": []
}
]
},
{
"name": "评论",
"item": [
{
"name": "发送匿名留言",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"content\": \"嘿嘿嘿~~\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/comment/sendAnonymousComment",
"host": [
"{{addr}}"
],
"path": [
"api",
"comment",
"sendAnonymousComment"
]
}
},
"response": []
},
{
"name": "获取评论列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/comment/listByTopicId?topicId=0&size=10&page=0",
"host": [
"{{addr}}"
],
"path": [
"api",
"comment",
"listByTopicId"
],
"query": [
{
"key": "topicId",
"value": "0"
},
{
"key": "size",
"value": "10"
},
{
"key": "page",
"value": "0"
}
]
}
},
"response": []
}
]
},
{
"name": "离线下载",
"item": [
{
"name": "创建下载任务",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"savePath\": \"/\",\r\n \"url\": \"https://bigota.d.miui.com/V11.0.5.0.PCACNXM/miui_MI6_V11.0.5.0.PCACNXM_996ffd2660_9.0.zip\",\r\n \"headers\": {\r\n \"ua\": \"a\",\r\n \"name\": \"xiaotao\"\r\n },\r\n \"method\": \"GET\",\r\n \"uid\": 1\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/task/download",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download"
]
},
"description": "## 创建一个下载任务 \n异步API,请求后在data中返回异步任务ID\n\n### 请求体json参数\n- savePath: 必填,下载后保存的目录\n- url: 必填,文件下载地址\n- headers: 选填,附加的请求header,key-value类型对象\n- method: 选填,请求方法,默认GET,可选:[HEAD, TRACE, GET, PATCH, DELETE, OPTIONS, PUT, POST],必须全大写\n请求体(Body)示例\n- proxy: 选填,代理节点名称\n\n### 请求体示例\n```json\n{\n \"savePath\": \"/\",\n \"url\": \"www.baidu.com\",\n \"headers\": {\n \"key\": \"value\",\n \"token\": \"123123123\"\n },\n \"method\": \"GET\",\n \"proxy\": \"local1\"\n}\n```"
},
"response": []
},
{
"name": "获取下载任务列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/task/download?uid=1&page=1&size=40&type=FINISH",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download"
],
"query": [
{
"key": "uid",
"value": "1"
},
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "40"
},
{
"key": "type",
"value": "FINISH"
}
]
},
"description": "## 查询参数\n- uid:要查询的用户\n- page:选填,页数,从1开始,默认1\n- size:选填,每页大小,每页大小,5-400之间,默认10\n\n## 响应data数组元素\n- id:下载任务的ID\n- uid:目标用户\n- url:文件URL\n- proxy:使用的代理名称\n- state: 任务状态,FINISH - 任务完成, FAILED - 任务失败, DOWNLOADING - 下载中,WAITING - 等待中\n- message:任务消息,一般为null,当任务失败时为失败消息\n- size:文件大小\n- name:文件名\n- savePath:保存到的网盘位置\n- createdAt:创建日期\n- finishAt:完成日期\n- createdBy:创建者\n\n## 响应体其他字段\n- totalItem:总数量\n- totalPage:当前分页大小下的总页数"
},
"response": []
},
{
"name": "中止下载任务",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/task/download?taskId=2c92e0818631a746018631a7efb80000",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download"
],
"query": [
{
"key": "taskId",
"value": "2c92e0818631a746018631a7efb80000"
}
]
}
},
"response": []
},
{
"name": "获取可用代理名称",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/task/download/proxy",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download",
"proxy"
]
}
},
"response": []
}
]
},
{
"name": "网络工具",
"item": [
{
"name": "WOL网络唤醒",
"item": [
{
"name": "获取用户WOL设备列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/nwt/findWolByUid?uid=1&checkOnline=true",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"findWolByUid"
],
"query": [
{
"key": "uid",
"value": "1"
},
{
"key": "checkOnline",
"value": "true",
"description": "是否检查设备在线状态"
}
]
}
},
"response": []
},
{
"name": "添加/保存WOL设备",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"我的设备\",\r\n \"mac\": \"AA:BB:CC:DD:EE:FF\",\r\n \"ip\": \"255.255.255.255\",\r\n \"port\": 9,\r\n \"uid\": 1\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/nwt/saveWolDevice",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"saveWolDevice"
]
}
},
"response": []
},
{
"name": "使用WOL唤醒设备",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/nwt/wakeWolDevice?id=864334797651050496",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"wakeWolDevice"
],
"query": [
{
"key": "id",
"value": "864334797651050496"
}
]
}
},
"response": []
}
]
},
{
"name": "获取所有已连接网络接口",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/nwt/getAllInterface",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"getAllInterface"
]
}
},
"response": []
}
]
},
{
"name": "WebShell",
"item": [
{
"name": "快捷执行命令(仅限管理员)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"cmd\": \"ping\",\r\n \"charset\": \"GBK\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/webShell/executeCommand",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"executeCommand"
]
}
},
"response": []
},
{
"name": "创建交互式Shell会话(仅限管理员)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"cmd\": \"\",\r\n \"shell\": \"powershell\",\r\n \"charset\": \"GBK\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/webShell/createSession",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"createSession"
]
}
},
"response": []
},
{
"name": "列出所有交互会话(仅限管理员)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/webShell/listSession",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"listSession"
]
}
},
"response": []
},
{
"name": "获取会话最近的输出(仅限管理员)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/webShell/getLog?sessionId=874123101577674752",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"getLog"
],
"query": [
{
"key": "sessionId",
"value": "874123101577674752",
"description": "会话id"
}
]
}
},
"response": []
}
]
},
{
"name": "获取系统特性",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/hello/feature",
"host": [
"{{addr}}"
],
"path": [
"api",
"hello",
"feature"
]
},
"description": "由于系统某些功能支持开关以及系统本身具有插件拓展能力,不同的咸鱼云实例能提供的的特性可能会不一致。通过该接口可以让客户端了解服务器的能力从而选择性进行功能调用。\n\n比如通过加载插件,服务器会比原生系统多支持exe、mp4文件的缩略图生成与查看。而客户端可以根据这一特性选择对exe、mp4文件请求缩略图查看\n\n- URI:`/api/hello/feature`\n- 动作:GET\n\n无需登录\n\n### 响应\n特性功能汇总"
},
"response": []
}
],
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{token}}",
"type": "string"
},
{
"key": "key",
"value": "Token",
"type": "string"
},
{
"key": "in",
"value": "header",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。