To enable the Compliance API, see the setup guide.
Set up the Compliance API원격 세션 메시지 조회
GET/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages
하나의 원격 세션 대화 기록(사용자 프롬프트, 어시스턴트 응답, 도구 호출 및 결과)을 조회합니다. 사고 블록과 이미지는 포함되지 않습니다.
메시지는 기본적으로 오래된 순서로 반환됩니다. 순서를 뒤집으려면 order=desc를 전달하세요. 페이지네이션은 목록 엔드포인트와 동일한 page/next_page 방식을 사용하며, 페이지당 최대 limit개의 메시지가 반환됩니다(기본값 100, 최대 1000). next_page가 null이 될 때까지 계속 페이지네이션하세요. tool_use_input_max_bytes와 tool_result_max_bytes는 각 도구 사용 입력과 각 도구 결과 텍스트 항목에서 반환되는 바이트 수를 제한합니다. 두 제한 중 하나로 인해 단축된 블록은 truncated: true를 포함합니다.
응답은 페이지네이션된 data 배열과 함께 session 아래에 세션의 메타데이터를 포함합니다. 이 엔드포인트에서 session.user.email_address와 session.started_by_user는 항상 null입니다. 대신 목록 엔드포인트에서 읽으세요.
세션이 아직 pending 상태인 경우, 삭제된 세션, 그리고 키가 읽을 수 있는 조직 외부의 세션에 대해서는 404를 반환합니다. 잘못된 형식의 세션 식별자는 400을 반환합니다.
Path parameters
Query parameters
Headers
Returns
원격 세션 메시지 조회
cURL
curl https://api.anthropic.com/v1/compliance/apps/sessions/remote/$CLAUDE_REMOTE_SESSION_ID/messages \
-H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"Response 200
{
"data": [
{
"id": "id",
"content": [
{
"text": "text",
"truncated": true,
"type": "text"
}
],
"content_unavailable": true,
"created_at": "2019-12-27T18:11:19.117Z",
"role": "assistant",
"sent_by_user_id": "sent_by_user_id"
}
],
"next_page": "next_page",
"session": {
"id": "id",
"agent_id": "agent_id",
"claude_project_id": "claude_project_id",
"created_at": "2019-12-27T18:11:19.117Z",
"organization_uuid": "organization_uuid",
"product_surface": "product_surface",
"started_by_user": {
"id": "id",
"email_address": "email_address"
},
"status": "status",
"updated_at": "2019-12-27T18:11:19.117Z",
"user": {
"id": "id",
"email_address": "email_address"
}
}
}Returns Examples
Response 200
{
"data": [
{
"id": "id",
"content": [
{
"text": "text",
"truncated": true,
"type": "text"
}
],
"content_unavailable": true,
"created_at": "2019-12-27T18:11:19.117Z",
"role": "assistant",
"sent_by_user_id": "sent_by_user_id"
}
],
"next_page": "next_page",
"session": {
"id": "id",
"agent_id": "agent_id",
"claude_project_id": "claude_project_id",
"created_at": "2019-12-27T18:11:19.117Z",
"organization_uuid": "organization_uuid",
"product_surface": "product_surface",
"started_by_user": {
"id": "id",
"email_address": "email_address"
},
"status": "status",
"updated_at": "2019-12-27T18:11:19.117Z",
"user": {
"id": "id",
"email_address": "email_address"
}
}
}