Claude Platform Docs

이벤트 나열

$client->beta->sessions->events->list(string sessionID, ?\Datetime createdAtGt, ?\Datetime createdAtGte, ?\Datetime createdAtLt, ?\Datetime createdAtLte, ?int limit, ?Order order, ?string page, ?list<ManagedAgentsSessionEventType> types, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<ManagedAgentsSessionEvent>
GET/v1/sessions/{session_id}/events
Requires anthropic-beta: managed-agents-2026-04-01. How to send beta headers

이벤트 나열

Parameters
sessionID: string⁠Path parameter
createdAtGt?: optional \Datetime⁠Query parameter

Return events created after this time (exclusive). Compared against the event's processed_at value.

createdAtGte?: optional \Datetime⁠Query parameter

Return events created at or after this time (inclusive). Compared against the event's processed_at value.

createdAtLt?: optional \Datetime⁠Query parameter

Return events created before this time (exclusive). Compared against the event's processed_at value.

createdAtLte?: optional \Datetime⁠Query parameter

Return events created at or before this time (inclusive). Compared against the event's processed_at value.

limit?: optional int⁠Query parameter
order?: optional Order⁠Query parameter

Sort direction for results, ordered by the event's processed_at. Defaults to asc (chronological).

page?: optional string⁠Query parameter

Opaque pagination cursor from a previous response's next_page.

types?: optional list<ManagedAgentsSessionEventType>⁠Query parameter

Filter by event type. Values match the type field on returned events (for example, user.message or agent.tool_use). Omit to return all event types.

betas?: optional list<AnthropicBeta>⁠Header parameter

This endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.

workspaceID?: optional string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
One of the following:
이벤트 나열
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;
use Anthropic\Beta\Sessions\Events\ManagedAgentsSessionEventType;

$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: [ManagedAgentsSessionEventType::USER_MESSAGE],
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($page);
Returns Examples
Response 200
{
  "data": [
    {
      "id": "sevt_011CZkZGPp1iBcp4kaQSihUm",
      "content": [
        {
          "text": "Where is my order #1234?",
          "type": "text"
        }
      ],
      "type": "user.message",
      "processed_at": "2026-03-15T10:00:00Z"
    },
    {
      "id": "sevt_011CZkZHPq1jCdq5mbRTjiVn",
      "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="
}