批量查询runtime - ListCoreRuntimes
功能介绍
该接口用于查询Agent运行时列表。支持按多种条件筛选和分页查询。
适用场景:
根据Agent运行时名称查询运行时列表,支持精确匹配和模糊匹配。
根据Agent运行时ID进行精确查询,支持批量查询多个运行时ID。
调用方法
请参见如何调用API。
授权信息
账号根用户具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备如下身份策略权限,更多的权限说明请参见权限和授权项。
| 授权项 | 访问级别 | 资源类型(*为必须) | 条件键 | 别名 | 依赖的授权项 |
|---|---|---|---|---|---|
| agentarts:runtime:listCoreRuntimes | List | runtime * | - | - | - |
URI
GET /v1/core/runtimes
请求参数
无
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total | Integer | 参数解释: 总记录数。 取值范围: 0 - 1000000。 |
| items | Array of CoreRunAgentRuntimeBasic objects | 参数解释: AgentRuntime对象列表。 取值范围: 数组类型,元素个数限制0 - 100。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | 参数解释: AgentRuntime唯一标识(用户操作唯一键,UUID随机生成)。 取值范围: 匹配标准的UUID格式(8-4-4-4-12的十六进制数字串,由连字符分隔),符合正则条件^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$。 |
| description | String | 参数解释: 描述信息。 取值范围: 长度为 0 - 4096 个字符。 |
| name | String | 参数解释: Agent名称。 取值范围: 以小写字母开头,以小写字母或数字结尾,可以包含小写字母、数字和中划线,长度为2-48个字符。 |
| latest_version | String | 参数解释: 最新版本名称。 取值范围: 长度为 2 - 24 个字符,必须以字母开头和结尾,支持中划线。 |
| created_at | String | 参数解释: 创建时间。 取值范围: 不涉及。 |
| agent_gateway_id | String | 参数解释: Agent Gateway ID。 取值范围: 匹配标准的UUID格式(8-4-4-4-12的十六进制数字串,由连字符分隔),符合正则条件^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$。 |
| updated_at | String | 参数解释: 最后更新时间。 取值范围: 不涉及。 |
| workload_identity_urn | String | 参数解释: Identity URN。 取值范围: 长度为 1 - 1500 个字符。 |
| tags | Array of CoreRunTagItemResp objects | 参数解释: 标签配置列表,对接TMS标签服务,用于资源分类。 取值范围: 不涉及。 |
| arch | String | 参数解释: 运行时架构。 取值范围: arm64、x86_64 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| key | String | 参数解释: 标签键。 取值范围: 长度为 1 - 128 个字符。 |
| value | String | 参数解释: 标签值。 取值范围: 长度为 0 - 255 个字符。 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。枚举值说明:AgentArts.03000400表示客户端请求参数错误。 取值范围: 固定值:AgentArts.03000400。 |
| error_msg | String | 参数解释: 错误详细信息。 取值范围: 长度为1-512个字符。 |
状态码:401
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。枚举值说明:AgentArts.03000401表示未授权(认证令牌缺失、无效或已过期)。 取值范围: 不涉及。 |
| error_msg | String | 参数解释: 错误详细信息。 取值范围: 长度为 1 - 512 个字符。 |
状态码:403
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。枚举值说明:AgentArts.03000403表示禁止访问(认证后权限不足)。 取值范围: 固定值:AgentArts.03000403。 |
| error_msg | String | 参数解释: 错误详细信息。 取值范围: 长度为 1 - 512 个字符。 |
| coded_authorization_message | String | 参数解释: IAM5 当OpenAPI无权限时报错信息。 取值范围: 长度为 1 - 1024 个字符。 |
| details | Array of CoreRunErrorDetail objects | 参数解释: 依赖的下游服务错误信息列表。 取值范围: 最小数量 0,最大数量 10。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 长度为 18 个字符。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 长度为 1 - 1024 个字符。 |
状态码:429
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。枚举值说明:AgentArts.03000429表示请求过于频繁(触发限流)。 取值范围: 固定值:AgentArts.03000429。 |
| error_msg | String | 参数解释: 错误详细信息。 取值范围: 长度为 1 - 512 个字符。 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。枚举值说明:AgentArts.03000500表示服务器内部错误。 取值范围: 固定值:AgentArts.03000500。 |
| error_msg | String | 参数解释: 错误详细信息。 取值范围: 长度为 1 - 512 个字符。 |
请求示例
响应示例
状态码:200
查询成功,返回符合条件的AgentRuntime列表。
-
{ "total" : 2, "items" : [ { "id" : "f47ac10b-58cc-4372-a567-0e02b2c3d479", "name" : "hello-agent", "description" : "一个简单的 Hello World Agent", "arch" : "arm64", "latest_version" : "V1", "agent_gateway_id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "created_at" : "2024-05-20T14:30:00Z", "updated_at" : "2024-05-20T14:30:00Z", "workload_identity_urn" : "agentIdentity:cn-north-7:domainId:workloadIdentity:workloadIdentityDirectory/directory/hello-agent", "tags" : [ { "key" : "env", "value" : "development" } ] }, { "id" : "8b7c6d5e-4f3a-2b1c-0d9e-8f7a6b5c4d3e", "name" : "production-agent", "description" : "生产环境 AI 助手运行时", "latest_version" : "V3", "arch" : "arm64", "agent_gateway_id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "created_at" : "2024-05-19T10:00:00Z", "updated_at" : "2024-05-21T09:15:00Z", "workload_identity_urn" : "agentIdentity:cn-north-7:domainId:workloadIdentity:workloadIdentityDirectory/directory/production-agent", "tags" : [ { "key" : "env", "value" : "production" }, { "key" : "team", "value" : "ai-platform" } ] } ] } -
{ "total" : 0, "items" : [ ] }
状态码
| 状态码 | 描述 |
|---|---|
| 200 | 查询成功,返回符合条件的AgentRuntime列表。 |
| 400 | 请求参数错误(如runtime_ids格式错误、name长度超出限制等)。 |
| 401 | 未授权(认证令牌缺失、无效或已过期)。 |
| 403 | 禁止访问(认证后权限不足)。 |
| 429 | 请求过于频繁(触发限流)。 |
| 500 | 服务器内部错误(如数据库查询异常、关联数据获取失败等)。 |
错误码
请参见错误码。