向 ECP 代理每个发布版本的一个条目:该发布版本发布了多少部署、其代码冻结的时间以及哪个部署是发布事件。发布是时间轴上的一个边界,因此,部署属于在其到达时处于开放状态的发布,或属于其部署的所属发布。
获取 /api/v1/项目/{id}/工作区/{workspace_id}/部署/版本
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}/deployments/versions' \
--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)
{
"versions": [
{
"deployment_count": 42,
"release_build_ids": [
"string"
],
"release_deployment_id": "string",
"release_version": "string",
"released_at": "2026-05-04T09:42:00Z"
}
]
}
响应示例 (200)
{
"versions": [
{
"deployment_count": 42,
"release_build_ids": [
"string"
],
"release_deployment_id": "string",
"release_version": "string",
"released_at": "2026-05-04T09:42:00Z"
}
]
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (403)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (403)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}