프로젝트 의 모든 작업 공간에 걸쳐 지속형 형 대화 세션을 가장 최근에 활성화된 세션부터 나열합니다. 이러한 세션에는 메시지와 실행 실행이 포함됩니다. 예약된 샌드박스 용량 추적 런타임 세션과는 별개입니다. 다음 페이지를 가져오려면 응답에서 Next_cursor를 커서 로 전달합니다.
쿼리 매개변수
-
최대 결과(기본값 50, 최대 200)
-
단일 작업 공간으로 제한
-
세션의 최신 실행 상태로 필터링
-
이 RFC3339 시간 또는 그 이후에 활동이 있는 세션만
-
이 RFC3339 시간 이전에 활동이 있는 세션만
-
이전 응답의 Next_cursor에서 가져온 불투명한 페이징 토큰입니다.
GET /api/v1/projects/{id}/sessions
curl \
--request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/sessions' \
--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)
{
"has_more": true,
"limit": 42,
"next_cursor": "string",
"sessions": [
{
"active_duration_ms": 42,
"created_at": "string",
"first_message_preview": "string",
"last_activity": "string",
"latest_status": "string",
"project_id": "string",
"session_id": "string",
"total_duration_ms": 42,
"total_tokens": 42,
"turns": 42,
"user_id": "string",
"visibility": "string",
"wait_ms": 42,
"workspace_id": "string"
}
],
"total_count": 42,
"truncated": true
}
응답 예시(200)
{
"has_more": true,
"limit": 42,
"next_cursor": "string",
"sessions": [
{
"active_duration_ms": 42,
"created_at": "string",
"first_message_preview": "string",
"last_activity": "string",
"latest_status": "string",
"project_id": "string",
"session_id": "string",
"total_duration_ms": 42,
"total_tokens": 42,
"turns": 42,
"user_id": "string",
"visibility": "string",
"wait_ms": 42,
"workspace_id": "string"
}
],
"total_count": 42,
"truncated": true
}
응답 예시(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
}
응답 예시(500)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(500)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(502)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(502)
{
"code": "string",
"error": "string",
"success": true
}