GetAgentSpecVersion - 查询 AgentSpec 指定版本
查询指定 AgentSpec 版本的完整内容,包括 manifest 内容、资源文件和元数据。
接口说明
请求说明
查询指定 AgentSpec 版本的完整内容,包括 manifest 内容、资源文件和元数据。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
agentcore:GetAgentSpecVersion |
get |
*AgentSpec
|
无 | 无 |
请求语法
GET /workspaces/{workspaceId}/agent-specs/{agentSpecName}/versions/{agentSpecVersion} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| workspaceId |
string |
是 |
工作空间 ID |
550e8400-e29b-41d4-a716-446655440000 |
| agentSpecName |
string |
是 |
AgentSpec 唯一名称 |
my-worker |
| agentSpecVersion |
string |
是 |
版本号 |
1.0.0 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
调用“查询 AgentSpec 指定版本”接口时,请按参数定义传入:工作空间 ID、AgentSpec 唯一名称、版本号。
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
版本完整内容 |
||
| data |
object |
返回数据。 |
|
| bizTags |
string |
业务标签。 |
示例属性值 |
| content |
string |
内容。 |
示例内容 |
| description |
string |
描述。 |
用于说明资源用途的示例描述。 |
| name |
string |
名称。 |
agentspec-example |
| resource |
object |
资源文件映射。 |
|
|
object |
资源文件映射中的属性值。 |
||
| content |
string |
内容。 |
示例内容 |
| metadata |
object |
元数据。 |
|
|
any |
元数据中的属性值。 |
示例属性值 |
|
| name |
string |
名称。 |
agentspec-example |
| type |
string |
类型。 |
file |
| requestId |
string |
请求 ID。 |
A1B2C3D4-E5F6-47A8-90AB-CDEF12345678 |
“查询 AgentSpec 指定版本”接口的响应包含:请求 ID、返回数据。
示例
正常返回示例
JSON格式
{
"data": {
"bizTags": "示例属性值",
"content": "示例内容",
"description": "用于说明资源用途的示例描述。",
"name": "agentspec-example",
"resource": {
"key": {
"content": "示例内容",
"metadata": {
"key": "示例属性值"
},
"name": "agentspec-example",
"type": "file"
}
}
},
"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. | 指定的资源已存在 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。