DownloadAgentSpecViaOss - 下载 AgentSpec
获取指定 AgentSpec 的 OSS 预签名下载地址,用于下载 AgentSpec ZIP 包。
接口说明
请求说明
获取指定 AgentSpec 的 OSS 预签名下载地址,用于下载 AgentSpec ZIP 包。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
agentcore:DownloadAgentSpecViaOss |
get |
*AgentSpec
|
无 | 无 |
请求语法
GET /workspaces/{workspaceId}/agent-specs/{agentSpecName}/actions/download-via-oss HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| workspaceId |
string |
是 |
工作空间 ID |
550e8400-e29b-41d4-a716-446655440000 |
| agentSpecName |
string |
是 |
AgentSpec 唯一名称 |
my-worker |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| agentSpecVersion |
string |
否 |
版本号,不填则下载 latest 标签对应的版本 |
1.0.0 |
调用“下载 AgentSpec”接口时,请按参数定义传入:工作空间 ID、AgentSpec 唯一名称、版本号,不填则下载 latest 标签对应的版本。
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
RestResult |
||
| data |
string |
返回数据。 |
https://example.com/artifacts/example.zip |
| requestId |
string |
请求 ID。 |
A1B2C3D4-E5F6-47A8-90AB-CDEF12345678 |
“下载 AgentSpec”接口的响应包含:请求 ID、返回数据。
示例
正常返回示例
JSON格式
{
"data": "https://example.com/artifacts/example.zip",
"requestId": "A1B2C3D4-E5F6-47A8-90AB-CDEF12345678"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IllegalRequest | Illegal request: %s. | 非法请求 |
| 400 | InvalidParameter | Parameter error: %s. | 参数错误 |
| 400 | InvalidParameter.ImportFileSize | The import file size exceeds the allowed limit: %s. | 导入文件大小超过限制 |
| 500 | InternalError | An internal error occurred. Please try again later. | 内部异常,请稍后重试;如持续失败,请提供 RequestId 排查 |
| 403 | NoPermission | You are not authorized to perform this operation: %s. | 无操作权限 |
| 404 | AgentSpecNotFound | Not found: %s. | |
| 409 | ResourceAlreadyExist | Resource already exists: %s. | 指定的资源已存在 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。