文档首页/ 智果(AgentArts)智能体平台/ API参考/ API/ 沙箱工具/ 代码解释器标签管理/ 批量添加代码解释器标签 - BatchCreateCoreCodeInterpreterTags
更新时间:2026-07-17 GMT+08:00
分享

批量添加代码解释器标签 - BatchCreateCoreCodeInterpreterTags

功能介绍

该API用于批量添加代码解释器标签。

调用方法

请参见如何调用API

授权信息

账号根用户具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备如下身份策略权限,更多的权限说明请参见权限和授权项

授权项

访问级别

资源类型(*为必须)

条件键

别名

依赖的授权项

agentarts::tagResource

Tagging

codeInterpreter *

g:ResourceTag/<tag-key>

-

-

-

  • g:RequestTag/<tag-key>

  • g:TagKeys

URI

POST /v1/code-interpreters/{code_interpreter_id}/tags/create

表1 路径参数

参数

是否必选

参数类型

描述

code_interpreter_id

String

参数解释:

代码解释器ID,可通过查询代码解释器列表接口获取。

约束限制:

不涉及。

取值范围:

符合UUID正则^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$的36位字符串。

默认取值:

不涉及。

请求参数

表2 请求Body参数

参数

是否必选

参数类型

描述

tags

Array of CoreToolsTagForPostTMS objects

参数解释:

标签键值对列表。

约束限制:

最多20个标签,且标签键不能重复。

取值范围:

数组长度0-20。

默认取值:

不涉及。

表3 CoreToolsTagForPostTMS

参数

是否必选

参数类型

描述

key

String

参数解释:

标签键。

约束限制:

不能为空或空字符串,不能为空格,校验和使用之前先trim前后的半角空格,且不能以_sys_开头。

取值范围:

最大长度128个unicode字符,可用 UTF-8 格式表示的字母、数字和空格,以及以下字符:_ . : / = + - @。

默认取值:

不涉及。

value

String

参数解释:

标签值。

约束限制:

不涉及。

取值范围:

最大长度255个unicode字符,可用 UTF-8 格式表示的字母、数字和空格,以及以下字符:_ . : / = + - @。

默认取值:

不涉及。

响应参数

状态码:204

操作成功,无响应内容。

状态码:400

表4 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码。

取值范围:

满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。

error_msg

String

参数解释:

错误信息。

取值范围:

不涉及。

状态码:401

表5 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码。

取值范围:

满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。

error_msg

String

参数解释:

错误信息。

取值范围:

不涉及。

状态码:403

表6 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码。

取值范围:

满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。

error_msg

String

参数解释:

错误信息。

取值范围:

不涉及。

encoded_authorization_message

String

参数解释:

编码后的授权失败信息,可找IAM服务oncall提供解码方式获取详细授权失败原因。

取值范围:

不涉及。

details

Array of CoreToolsCommonError objects

参数解释:

依赖的下游服务错误信息列表。

取值范围:

不涉及。

表7 CoreToolsCommonError

参数

参数类型

描述

error_code

String

参数解释:

错误码。

取值范围:

满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。

error_msg

String

参数解释:

错误信息。

取值范围:

不涉及。

状态码:404

表8 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码。

取值范围:

满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。

error_msg

String

参数解释:

错误信息。

取值范围:

不涉及。

状态码:429

表9 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码。

取值范围:

满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。

error_msg

String

参数解释:

错误信息。

取值范围:

不涉及。

状态码:500

表10 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

错误码。

取值范围:

满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。

error_msg

String

参数解释:

错误信息。

取值范围:

不涉及。

请求示例

/v1/code-interpreters/{code_interpreter_id}/tags/create

{
  "tags" : [ {
    "key" : "key1",
    "value" : "value1"
  } ]
}

响应示例

状态码:400

请求参数错误。

{
  "error_code" : "AgentArts.04000001",
  "error_msg" : "Invalid parameter."
}

状态码:401

认证失败。

{
  "error_code" : "AgentArts.04000002",
  "error_msg" : "Authentication failed: invalid token"
}

状态码:403

权限不足。

{
  "error_code" : "AgentArts.04000003",
  "error_msg" : "Authentication failed: you have no permission of VCPEP.",
  "encoded_authorization_message" : "eyJlcnJvciI6ICJVbmF1dGhvcml6ZWQifQ==",
  "details" : [ {
    "error_code" : "AgentArts.04000403",
    "error_msg" : "Authentication information is incorrect or you have no permissions."
  } ]
}

状态码:404

资源不存在。

{
  "error_code" : "AgentArts.04000004",
  "error_msg" : "Resource not found"
}

状态码:429

请求频率超限。

{
  "error_code" : "AgentArts.04000006",
  "error_msg" : "Too many requests: please retry later"
}

状态码:500

内部系统错误。

{
  "error_code" : "AgentArts.04000000",
  "error_msg" : "System error. Please retry."
}

状态码

状态码

描述

204

操作成功,无响应内容。

400

请求参数错误。

401

认证失败。

403

权限不足。

404

资源不存在。

429

请求频率超限。

500

内部系统错误。

错误码

请参见错误码

相关文档