返回由路由 ID 路径参数标识的项目中每个工作区的 ECP 所有的活动/暂停状态。始终从 ECP 实时获取(并发的相同请求会去重,但不会在请求之间进行缓存)。软失败:如果 ECP 无法访问,或第一页以后的页面失败,则返回上次已知的正常响应(最长可达 10 分钟),如果存在;否则返回 200 和一个空列表(或者,如果是部分多页失败且无可用的备用,则返回截至目前收集的部分结果。)
GET /api/v1/projects/{id}/workspace-statuses
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspace-statuses' \
--header "Authorization: $API_KEY"
响应示例 (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)
{
"statuses": [
{
"status": "string",
"workspace_id": "string"
}
],
"total": 42
}
响应示例 (200)
{
"statuses": [
{
"status": "string",
"workspace_id": "string"
}
],
"total": 42
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (401)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (401)
{
"code": "string",
"error": "string",
"success": true
}