create
create(Accepted keys: Ingestion API key; Classic API key (deprecated) Start a new session Start a new session. The request body is a bare session object (norequest:CreateSessionRequest):Promise<CreateSessionResponse>
session wrapper). The server creates a session event and returns
it.
No required properties. Every field has a server-side fallback.
Auto-generated properties (provided by the server when omitted):
session_id(string, UUID): Server generates a UUIDv4 if omitted or if the supplied value is not a valid UUID.
event_name(string): Falls back tosession_namewhen not provided; defaults to"unknown"if both are absent.source(string): Defaults to"unknown".
session_name(string): Display name for the session.start_time(number): Session start time as Unix milliseconds. The session normalizer usesgetInt64()which only accepts numeric types; if a string is passed, the server silently falls back to the current time.end_time(number): Session end time as Unix milliseconds (same numeric-only caveat asstart_time).duration(number): Session duration in milliseconds.config(object): Configuration associated with the session.inputs(object): Input data for the session.outputs(object): Output data from the session.metadata(object): Arbitrary metadata.user_properties(object): User properties.children_ids(array of strings): IDs of child events.
session_id: posting twice with the same session_id
merges metadata/user_properties into the existing session and returns
the existing event.
createDeletionRequest
createDeletionRequest(Accepted keys: Data plane fine-grained API key Request deletion of sessions Request deletion of up to 1000 sessions in a project, by session id. The call records the request and returns at once with a request id. A scheduled job then deletes the sessions, so read the request to follow its progress. A session id that does not exist completes as a no-op. A session isrequest:CreateSessionDeletionRequestRequest):Promise<CreateSessionDeletionRequestResponse>
completed when its data is deleted from object storage and the session is hidden from every query. The physical removal from the query store follows in a daily purge. The caller’s key must carry project.session.delete for the project. Session deletion is opt-in on a self-hosted data plane: on a data plane where the session deletion job is not enabled, this operation answers 501.
createEventBatch
createEventBatch(Accepted keys: Ingestion API key; Classic API key (deprecated) Add a batch of events to a session Add a batch of events to an existing session. Each event in the batch is stored withrequest:CreateSessionEventBatchRequest):Promise<CreateSessionEventBatchResponse>
session_id set from the URL path, overriding any
session_id in the event body.
Each event must include event_type (one of chain, model, tool,
session) and inputs. Unknown top-level fields and unknown per-event
fields are rejected. Events are processed sequentially. For
higher-throughput ingestion across sessions, use
POST /v1/events/batch instead.
Example response
getDeletionRequest
getDeletionRequest(Accepted keys: Data plane fine-grained API key Get a session deletion request Retrieve the status of a session deletion request and how many of its sessions are pending, processing, completed or failed.request:GetSessionDeletionRequestRequest):Promise<GetSessionDeletionRequestResponse>
pending and processing mean work remains, and every other status is final. completed means every session is deleted from object storage and hidden from every query, before the daily purge removes them from the query store. failed means at least one session failed, and other sessions in the request can be completed, so read session_counts for the number in each state. The caller’s key must carry project.session.delete for the project.