Apps API · KB Uploads
KB Uploads: 2 个接口
POST /api/v1/uploads/finalize
Finalize upload
权限(scope): kb:file:write · 调用方式: appToken · operationId: finalize-upload
Required app scope: kb:file:write.
Finalizes a prepared file upload. Response wrapped in standard envelope.
请求体
application/json · FinalizeUploadRequestBody
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
upload_token |
string | 是 | Opaque upload token |
回包
200OK —application/json·DataResponseTreeNodeItemBodydefaultError —application/problem+json·D8Error
POST /api/v1/uploads/prepare
Prepare upload
权限(scope): kb:file:write · 调用方式: appToken · operationId: prepare-upload
Required app scope: kb:file:write.
Prepares a direct file upload. Response wrapped in standard envelope.
请求体
application/json · PrepareUploadRequestBody
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
content_type |
string | 是 | Content type |
filename |
string | 是 | File name |
parent_id |
string (uuid) | Parent folder node UUID | |
size_bytes |
integer (int64) | 是 | File size in bytes |
回包
200OK —application/json·DataResponsePrepareUploadItemBodydefaultError —application/problem+json·D8Error
