外观
创建新版本
POST
/v1/versions/save
为已存在文档登记一个新版本(内容已通过上传 / 直传链路落库时使用)。前置:对目标文档具备 WRITE 权限。副作用:新版本成为当前版本,版本号自增,历史版本保留。
授权
apiKey
类型
API Key (header: Authorization)
参数
请求头参数
X-Atk-User-Token
强通道:系统自签的不透明用户会话 token,用于 Client 代表用户调用。 与 X-Atk-Act-As-Source / X-Atk-Act-As-Source-Id 互斥,同时携带服务端返回 400 INVALID_DELEGATION_HEADERS。
类型
string
X-Atk-Act-As-Source
弱通道:身份 source 主张(要求 Client 已开启 actAsAllowed)。 必须与 X-Atk-Act-As-Source-Id 成对携带,缺一服务端返回 400 INCOMPLETE_ACT_AS_HEADERS;与 X-Atk-User-Token 互斥,同时携带服务端返回 400 INVALID_DELEGATION_HEADERS。
类型
string
X-Atk-Act-As-Source-Id
弱通道:身份 sourceId 主张(要求 Client 已开启 actAsAllowed)。 必须与 X-Atk-Act-As-Source 成对携带,缺一服务端返回 400 INCOMPLETE_ACT_AS_HEADERS;与 X-Atk-User-Token 互斥,同时携带服务端返回 400 INVALID_DELEGATION_HEADERS。
类型
string
请求体
application/json
JSON "docId": "string", "comment": "string", "idempotencyKey": "string", "contentHash": "string", "sizeBytes": 0, "blobId": "string", "mimeType": "string", "originalFilename": "string", "label": "string"
{
}
响应
OK
*/*
JSON "code": 0, "data": { "versionId": "string", "docId": "string", "versionNo": 0, "blobId": "string", "contentHash": "string", "sizeBytes": 0, "mimeType": "string", "originalFilename": "string", "comment": "string", "createBy": "string", "createTime": "string", "label": "string" }, "ts": 0, "rid": "string", "msg": "string", "success": true
{
}