リモートセッションメッセージの取得
GET/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages
1 つのリモートセッションのトランスクリプト(ユーザープロンプト、アシスタントの応答、ツール呼び出しと結果)を取得します。思考ブロックと画像は含まれません。
メッセージはデフォルトで古い順に返されます。逆順にするには order=desc を渡してください。ページネーションは一覧エンドポイントと同じ page/next_page 方式を使用し、1 ページあたり最大 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"
}
}
}