POST /api/v1/forward/templates/{template_id}/archive
归档是软状态变更,不会物理删除历史记录。
请求头
路径参数
示例请求
示例响应
HTTP 200 OK响应字段
错误
注意事项
- 归档后的 Template 默认不会出现在 active 列表中。
- 归档不会删除历史 Session 或配置记录。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
归档一个 Forward Template。
POST /api/v1/forward/templates/{template_id}/archive
归档是软状态变更,不会物理删除历史记录。
| Header | 是否必填 | 说明 |
|---|---|---|
| Authorization | 是 | Bearer <PAT> |
| Idempotency-Key | 否 | 有副作用请求可选的幂等键。 |
| 参数 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| template_id | string | 是 | Forward Template ID。 |
curl -s -X POST 'https://api.qoder.com/api/v1/forward/templates/tmpl_support/archive' \
-H "Authorization: Bearer $QODER_PAT"
{
"type": "template",
"id": "tmpl_support",
"name": "Support assistant",
"description": "Handles customer support requests",
"status": "archived",
"model": "ultimate",
"system": "You are a helpful support assistant.",
"tools": [],
"mcp_servers": [],
"skills": [],
"environment_id": "env_support",
"vault_ids": [
"vault_crm"
],
"files": {},
"environment_variables": {
"BASE_MODE": "support"
},
"metadata": {},
"created_at": "2026-06-18T10:00:00Z",
"updated_at": "2026-06-18T10:30:00Z"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| 返回值 | object | 归档后的 Template 对象,status 为 archived。 |
| HTTP | Type | Code | 触发条件 |
|---|---|---|---|
| 404 | not_found_error | - | Template 不存在或当前调用方不可见。 |
| 409 | conflict_error | - | 当前状态不允许归档。 |
| 401 | authentication_error | authentication_required | PAT 无效或已过期。 |