イベントの一覧
GET/v1/sessions/{session_id}/events
イベントの一覧
Parameters
Returns
イベントの一覧
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client(apiKey: 'my-anthropic-api-key');
$page = $client->beta->sessions->events->list(
'sesn_011CZkZAtmR3yMPDzynEDxu7',
createdAtGt: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLt: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
limit: 0,
order: 'asc',
page: 'page',
types: ['string'],
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);
var_dump($page);Response 200
{
"data": [
{
"id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
},
{
"id": "sevt_011CZkZHPq1jCdq5lbRTjiVnz",
"content": [
{
"text": "Let me look up order #1234 for you.",
"type": "text"
}
],
"processed_at": "2026-03-15T10:00:00Z",
"type": "agent.message"
}
],
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}Returns Examples
Response 200
{
"data": [
{
"id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
},
{
"id": "sevt_011CZkZHPq1jCdq5lbRTjiVnz",
"content": [
{
"text": "Let me look up order #1234 for you.",
"type": "text"
}
],
"processed_at": "2026-03-15T10:00:00Z",
"type": "agent.message"
}
],
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}