Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
PUT /v1/skills/{skill_id}
更新指定 Skill 的元数据(名称、描述等)。仅支持 JSON 请求体,用于修改元数据字段,不支持上传新文件。
请求头
| 头部 | 必选 | 说明 |
|---|
Authorization | 是 | Bearer <PAT> |
Content-Type | 是 | application/json |
路径参数
| 参数 | 类型 | 必选 | 说明 |
|---|
skill_id | string | 是 | Skill 的唯一标识符 |
请求体
| 字段 | 类型 | 必选 | 说明 |
|---|
name | string | 否 | 新的 Skill 名称 |
description | string | 否 | 新的 Skill 描述 |
示例请求
curl -X PUT "https://openapi.qoder.sh/api/v1/cloud/skills/skill_019e3bba474b73cfaf19eae9b5f5e66d" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "updated-skill-name",
"description": "更新后的 Skill 描述"
}'
示例响应
HTTP 200 OK
{
"id": "skill_019e3bba474b73cfaf19eae9b5f5e66d",
"type": "skill",
"name": "updated-skill-name",
"description": "更新后的 Skill 描述",
"skill_type": "custom",
"status": "active",
"version": 1,
"content_size": 309,
"content_sha256": "f253cb7d35790025f85917c0c239422cff1de067d00278db8897c585a3f28d94",
"metadata": {},
"created_at": "2026-05-18T15:35:24.248164Z",
"updated_at": "2026-05-18T15:36:01.767469Z"
}
响应说明
updated_at 字段会更新为操作时间
version 不会因元数据更新而递增(仅内容变化时递增)
- 未提供的字段保持原值不变
错误码
| HTTP | type | 触发条件 |
|---|
| 400 | invalid_request_error | 使用 multipart 而非 JSON:Request body must be valid JSON. |
| 401 | authentication_error | 缺少或无效的认证令牌 |
| 404 | not_found_error | Skill 不存在或已删除 |
注意事项
- PUT 端点仅接受
application/json Content-Type
- 仅用于更新元数据,不支持上传新的 zip 文件
- 如需更新 Skill 内容文件,需要通过
POST /v1/skills 重新创建
完整错误信封说明详见 错误参考。