Consulta primero un clúster Atlas Flex, luego un clúster dedicado, utilizando el token delegado de un usuario que llama o una cuenta de servicio de motor de agente emparejada. La respuesta detallada incluye la cadena de conexión que Atlas omite de las respuestas de lista para los clústeres Flex inactivos. Las claves API del motor de agente no se aceptan. Un project_id o cluster_name inválido se rechaza antes de cualquier llamada a Atlas.
Respuestas
-
Versión de la API no compatible o con formato incorrecto, una operación no disponible en el contrato publicado seleccionado o una representación inaceptable (incluidos parámetros de tipo de medios no compatibles o SSE excluido). Los fallos existentes de autenticación, autorización y límite de peticiones tienen prioridad.
-
OK
-
ID_NO_VÁLIDO o SOLICITUD_NO_VÁLIDA
-
PLATFORM_OAUTH_REQUIRED o PLATFORM_OAUTH_RESOURCE_REJECTED
-
ATLAS_PERMISSION_REQUIRED, ATLAS_SERVICE_ACCOUNT_NO_EMPAREJADO o PROHIBIDO
-
NOT_FOUND
-
ERROR_INTERNO
-
Atlas inalcanzable o respuesta no OK
-
PLATFORM_OAUTH_NOT_CONFIGURED o SERVICE_UNAVAILABLE cuando ya está en curso una actualización de token delegado
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/atlas/projects/{project_id}/clusters/{cluster_name}' \
--header "Authorization: $API_KEY"
{
"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"
}
{
"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"
}
{
"connection_string_srv": "string",
"id": "string",
"is_flex": true,
"name": "string",
"provider": "string",
"region": "string",
"state_name": "string",
"tier": "string"
}
{
"connection_string_srv": "string",
"id": "string",
"is_flex": true,
"name": "string",
"provider": "string",
"region": "string",
"state_name": "string",
"tier": "string"
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}