查询 Skill 版本历史
接口介绍
本接口(
/v3/skill/versions)用于查看 Skill 的历史变更记录。功能说明如下:版本列表:返回指定 Skill 的全部历史版本信息,按版本号降序排列。
变更类型:每条记录包含变更类型(如
created、content_update、file_added)。分页查询:支持通过
limit 和 offset 参数分页获取历史版本。Method 与 URL
POST https://memory.tdai.tencentyun.com/v3/skill/versions
使用示例
curl -i -X POST \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer *********************************' \\-H "x-tdai-service-id: tdai-mem-xxxxxxxx" \\https://memory.tdai.tencentyun.com/v3/skill/versions \\-d '{"skill_id":"skill-abc123","limit":10,"offset":0}'
请求参数
Body 参数
参数 | 是否必选 | 参数含义 | 配置方法及要求 |
skill_id | 是 | Skill ID。 | 数据类型:String。 |
limit | 否 | 每页返回数量。 | 数据类型:Integer。 |
offset | 否 | 分页偏移量,从0开始。 | 数据类型:Integer。 |
team_id | 否 | 团队 ID。 | 数据类型:String。 |
agent_id | 否 | Agent ID。 | 数据类型:String。 |
user_id | 否 | 用户 ID。 | 数据类型:String。 |
task_id | 否 | 任务 ID。 | 数据类型:String。 |
响应示例
{"code":0,"message":"ok","request_id":"req-jkl012","data":{"items":[{"version":3,"created_at":"2026-08-15T14:30:00Z","change_type":"content_update"},{"version":2,"created_at":"2026-08-10T09:00:00Z","change_type":"file_added"},{"version":1,"created_at":"2026-08-01T10:00:00Z","change_type":"created"}],"total":3}}
响应参数说明
参数名(一级) | 参数名(二级) | 参数含义 |
data | items | 版本列表,按版本号降序排列。 |
| items[].version | 版本号。 |
| items[].created_at | 该版本创建时间。 |
| items[].change_type | 变更类型。 |
| total | 总版本数。 |
错误码
HTTP 状态码 | 错误信息 | 说明 |
401 | Missing or invalid Authorization header | Bearer API Key 缺失或格式不正确。 |
404 | SKILL_NOT_FOUND | 指定 Skill 不存在。 |
500 | Internal error | 服务内部错误,可有限重试。 |