部分更新工作区。项目范围由路由 ID 路径参数承载。仅限字段的补丁返回 204;仅状态补丁(暂停/恢复)与其他字段互斥,并返回带有 ECP 的应用主体的 200(包括任何 warnings)。
PATCH /api/v1/projects/{id}/workspaces/{workspace_id}
curl \
--request PATCH 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"agent_card": {
"a2a_allowed_callers": [
"string"
],
"a2a_enabled": true,
"capabilities": [
"string"
],
"input_modes": [
"string"
],
"output_modes": [
"string"
],
"skills": [
{
"description": "string",
"example_input": "string",
"example_output": "string",
"name": "string"
}
],
"summary": "string"
},
"auto_deploy": true,
"description": "string",
"features": {
"guardrails": true,
"memory": true,
"playground": true,
"use_custom_parser": true
},
"framework": "string",
"gitops": {
"branch": "string",
"connection_ref": "string",
"manifest_path": "string",
"provider": "string",
"repo_url": "string"
},
"name": "string",
"release_mode": "string",
"status": "string",
"subdirectory": "string",
"workspace_name": "string"
}'
请求示例
{
"agent_card": {
"a2a_allowed_callers": [
"string"
],
"a2a_enabled": true,
"capabilities": [
"string"
],
"input_modes": [
"string"
],
"output_modes": [
"string"
],
"skills": [
{
"description": "string",
"example_input": "string",
"example_output": "string",
"name": "string"
}
],
"summary": "string"
},
"auto_deploy": true,
"description": "string",
"features": {
"guardrails": true,
"memory": true,
"playground": true,
"use_custom_parser": true
},
"framework": "string",
"gitops": {
"branch": "string",
"connection_ref": "string",
"manifest_path": "string",
"provider": "string",
"repo_url": "string"
},
"name": "string",
"release_mode": "string",
"status": "string",
"subdirectory": "string",
"workspace_name": "string"
}
响应示例 (406)
操作不可用
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
响应示例 (406)
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
响应示例 (200)
{
"app_id": "string",
"org_id": "string",
"project_id": "string",
"status": "active",
"warnings": [
"string"
]
}
响应示例 (200)
{
"app_id": "string",
"org_id": "string",
"project_id": "string",
"status": "active",
"warnings": [
"string"
]
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (404)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (404)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (413)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (413)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (429)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (429)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (500)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (500)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (503)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (503)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}