返回由路由 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
}