Obtiene todos los mensajes de una sesión específica a través del motor de orquestación del espacio de trabajo. El ámbito del proyecto se define mediante el parámetro de ruta id, y la organización se deriva de dicho proyecto.
Respuestas
-
Versión de API no compatible o con formato incorrecto, operación no disponible en el contrato publicado seleccionado o representación inaceptable (incluidos parámetros de tipo de medio no compatibles o SSE excluidos). Los fallos de autenticación, autorización y límite de velocidad existentes tienen prioridad.
-
OK
-
Solicitud incorrecta
-
No autorizado
-
PROJECT_SECRET_INVALID: el espacio de trabajo no se puede iniciar porque un secreto de proyecto no es válido o es inaccesible (corrija el secreto y vuelva a implementar).
-
Error interno del servidor
-
Puerta de enlace incorrecta
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/sessions/{session_id}/messages' \
--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"
}
{
"history_status": "string",
"latest_status": "string",
"messages": [
{
"additional_kwargs": {},
"content": "string",
"id": "string",
"name": "string",
"role": "string",
"session_id": "string",
"timestamp": "string",
"tool_call_id": "string",
"tool_calls": [
{
"id": "string",
"index": 42,
"name": "string",
"type": "string"
}
]
}
]
}
{
"history_status": "string",
"latest_status": "string",
"messages": [
{
"additional_kwargs": {},
"content": "string",
"id": "string",
"name": "string",
"role": "string",
"session_id": "string",
"timestamp": "string",
"tool_call_id": "string",
"tool_calls": [
{
"id": "string",
"index": 42,
"name": "string",
"type": "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
}