归档工作区
OpenAPI 契约
- 方法
- POST
- 路径
/api/v1/workspaces/{id}/archive- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "Workspace archived",
"content": {
"application/json": {
"$ref": "#/components/schemas/WorkspaceResponse"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"404": {
"description": "Requested workspace resource was not found",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"409": {
"description": "Request conflicts with current workspace state",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}POST /api/v1/workspaces/{id}/archive 仅限 JWT,并且需要 workspace:manage。它将工作区标记为已归档、记录归档时间,并返回更新后的工作区响应。为账户创建的个人工作区不能归档,会返回冲突。
归档可通过恢复操作撤销,不会删除工作区历史。不可访问的工作区不会被暴露,nfy_ 自动化密钥不能调用此操作。