创建产物上传凭证
接口说明
获取上传内容所需链接,适用于大文件。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /digitalEmployee/{name}/artifacts/uploadToken HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| name |
string |
是 |
数字员工名称 |
sample-agent |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| artifactPath |
string |
否 |
产物上传目录,相对于数字员工产物根目录;只能为空或 upload/ 下的目录;未传时默认使用 upload/{YYYY-MM-DD}/ |
upload/2026-05-25/ |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| requestId |
string |
请求 ID |
0A1B2C3D-4E5F-6789-ABCD-1234567890AB |
| artifactPath |
string |
服务端归一化后的逻辑上传目录,相对于数字员工产物根目录 |
upload/2026-05-25/ |
| host |
string |
OSS 表单上传地址 |
https://example-bucket.oss-cn-shanghai.aliyuncs.com |
| dir |
string |
允许上传的 OSS 对象前缀 |
agents/123/sample-agent/home/starops/upload/2026-05-25/ |
| accessId |
string |
OSS 上传使用的 AccessKey ID |
LTAI****** |
| policy |
string |
Base64 编码后的 OSS Post Policy |
eyJleHBpcmF0aW9uIjoiMjAyNi0wNS0yMVQwODowMDowMFoifQ== |
| signature |
string |
OSS Post Policy 签名 |
abc123signature |
| successActionStatus |
string |
OSS 上传成功状态码 |
200 |
| expire |
integer |
上传凭证过期时间,Unix 时间戳,单位为秒 |
1770000000 |
| maxSize |
integer |
单文件上传大小上限,单位为字节 |
104857600 |
示例
正常返回示例
JSON格式
{
"requestId": "0A1B2C3D-4E5F-6789-ABCD-1234567890AB",
"artifactPath": "upload/2026-05-25/",
"host": "https://example-bucket.oss-cn-shanghai.aliyuncs.com",
"dir": "agents/123/sample-agent/home/starops/upload/2026-05-25/",
"accessId": "LTAI******",
"policy": "eyJleHBpcmF0aW9uIjoiMjAyNi0wNS0yMVQwODowMDowMFoifQ==",
"signature": "abc123signature",
"successActionStatus": "200",
"expire": 1770000000,
"maxSize": 104857600
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。