帮你快速理解、总结文档立即下载

更新 Record 可变元数据

最近更新时间:2026-09-24 01:09:10
我的收藏

1. 接口描述

接口请求域名: ags.tencentcloudapi.com 。

更新 Registry Record。两种互斥模式:①Record 更新模式:不提交任何 Source / CustomDescriptors,可通过 Description、LabelMutations 修改元数据与 Label(至少提交一项);②Version 创建模式:提交且仅提交一种与现有 DescriptorType 匹配的内容输入,可选 VersionName / ChangeLog,禁止 Description / LabelMutations,服务端在 Record 下创建下一个 Revision。取代原 ChangeRegistryRecordStableVersion / RollbackRegistryRecordVersion / Create*RegistryRecordVersion。

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。

参数名称 必选 类型 描述
Action 是 String 公共参数,本接口取值:UpdateRegistryRecord。
Version 是 String 公共参数,本接口取值:2025-09-20。
Region 是 String 公共参数,详见产品支持的 地域列表,本接口仅支持其中的: ap-beijing, ap-chongqing, ap-guangzhou, ap-shanghai 。
RegistryId 是 String

Registry ID。


示例值:reg-0123abcd
RecordId 是 String

Record ID。


示例值:rec-0123abcd
Description 否 String

Record 描述,可选。Record 更新模式下允许,允许空字符串清空;Version 创建模式禁止。


示例值:更新后的描述
VersionName 否 String

新 Version 的展示名,可选。仅 Version 创建模式允许。


示例值:rv-0123abcd
ChangeLog 否 String

新 Version 的变更原因,最大 4096 字符,可选。仅 Version 创建模式允许。


示例值:更新版本
MCPSource 否 CloudMCPSourceInput

Version 创建模式:现有 Record 的 DescriptorType=MCP 时可提交。

AgentSource 否 CloudAgentSourceInput

Version 创建模式:现有 Record 的 DescriptorType=A2A 或 AGUI 时可提交。

SkillSource 否 CloudSkillSourceInput

Version 创建模式:现有 Record 的 DescriptorType=AGENT_SKILLS 时可提交。

CustomDescriptors 否 String

Version 创建模式:现有 Record 的 DescriptorType=CUSTOM 时可提交,必须是 JSON object 字符串。


示例值:{"vendor":"example","capability":"order-query"}
LabelMutations.N 否 Array of CloudRecordLabelMutation

Record 更新模式:Label 变更列表,最多 32 条,同一次请求中 Label Name 不可重复。

3. 输出参数

参数名称 类型 描述
Record CloudRecord

更新后的 Record。

Version CloudRecordVersion

Version 创建模式返回:本次创建的新 Version。

UploadURL String

Version 创建模式且 SkillSource.Type=TAR_PACKAGE 时返回。


注意:此字段可能返回 null,表示取不到有效值。
示例值:https://cos.example/upload
ExpireTime String

Version 创建模式且 SkillSource.Type=TAR_PACKAGE 时返回。


注意:此字段可能返回 null,表示取不到有效值。
示例值:2026-08-11T00:05:00Z
ContentStatus String

Version 创建模式且 SkillSource.Type=TAR_PACKAGE 时返回。


注意:此字段可能返回 null,表示取不到有效值。
示例值:UPLOADING
RequestId String 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 Record 更新模式:移动 stable + 新增 grey

不提交 Source/CustomDescriptors 时是 Record 更新模式,允许 Description/LabelMutations。

输入示例

POST / HTTP/1.1
Host: ags.internal.tencentcloudapi.com
X-TC-Action: UpdateRegistryRecord
X-TC-Version: 2025-09-20
X-TC-Region: ap-guangzhou
X-TC-RequestId: req-example
Content-Type: application/json

{
    "RegistryId": "reg-0123abcd",
    "RecordId": "rec-0123abcd",
    "LabelMutations": [
        {
            "Operation": "SET",
            "Name": "stable",
            "VersionId": "rv-0002abcd",
            "Reason": "发布已验证的第二版"
        },
        {
            "Operation": "SET",
            "Name": "grey",
            "VersionId": "rv-0003abcd",
            "Reason": "灰度环境验证第三版"
        }
    ]
}

输出示例

{
    "Response": {
        "RequestId": "req-example",
        "Record": {
            "RecordId": "rec-0123abcd",
            "LabelSet": [
                "stable",
                "latest",
                "grey"
            ]
        }
    }
}

示例2 Version 创建模式:MCP URL_IMPORT

提交内容输入进入 Version 创建模式;禁止同时提交 Description/LabelMutations。

输入示例

POST / HTTP/1.1
Host: ags.internal.tencentcloudapi.com
X-TC-Action: UpdateRegistryRecord
X-TC-Version: 2025-09-20
X-TC-Region: ap-guangzhou
X-TC-RequestId: req-example
Content-Type: application/json

{
    "RegistryId": "reg-0123abcd",
    "RecordId": "rec-0123abcd",
    "VersionName": "v2",
    "ChangeLog": "增加订单状态筛选参数",
    "MCPSource": {
        "Type": "URL_IMPORT",
        "EndpointURL": "https://example.com/mcp-v2.json"
    }
}

输出示例

{
    "Response": {
        "RequestId": "req-example",
        "Record": {
            "RecordId": "rec-0123abcd"
        },
        "Version": {
            "VersionId": "rv-0004abcd",
            "Revision": 4,
            "Status": "PENDING_APPROVAL"
        }
    }
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。

错误码 描述
AuthFailure CAM签名/鉴权错误。
FailedOperation 操作失败。
InternalError 内部错误。
InvalidParameter.AgentSource InvalidParameter.AgentSource
InvalidParameter.CustomDescriptors InvalidParameter.CustomDescriptors
InvalidParameter.MCPSource InvalidParameter.MCPSource
InvalidParameter.RecordId InvalidParameter.RecordId
InvalidParameter.RecordSource InvalidParameter.RecordSource
InvalidParameter.RegistryId InvalidParameter.RegistryId
InvalidParameter.SkillSource InvalidParameter.SkillSource
InvalidParameter.VersionId InvalidParameter.VersionId
InvalidParameterValue 参数取值错误。
InvalidParameterValue.AgentSourceType InvalidParameterValue.AgentSourceType
InvalidParameterValue.MCPSourceType InvalidParameterValue.MCPSourceType
InvalidParameterValue.SkillSourceType InvalidParameterValue.SkillSourceType
LimitExceeded 超过配额限制。
LimitExceeded.RecordLabelCount LimitExceeded.RecordLabelCount
MissingParameter 缺少参数错误。
MissingParameter.AgentSourceEndpointURL MissingParameter.AgentSourceEndpointURL
MissingParameter.MCPSourceDescriptors MissingParameter.MCPSourceDescriptors
MissingParameter.RecordSource MissingParameter.RecordSource
MissingParameter.SkillSourceSkillMd MissingParameter.SkillSourceSkillMd
ResourceInUse 资源被占用。
ResourceNotFound 资源不存在。
ResourceNotFound.RegistryRecord ResourceNotFound.RegistryRecord
ResourceUnavailable 资源不可用。
UnauthorizedOperation 未授权操作。
UnknownParameter 未知参数错误。
UnsupportedOperation 操作不支持。