This feature is in public preview.
data.
action names what happened, and occurred_at records when, as a Unix timestamp in seconds. actor is the API token whose request caused the event, or { "type": "system" } for automated actions, such as a preemption or a scheduled end. targets lists the resources the event is about as {type, id} pairs. Each id is the same ID the rest of the API uses for that resource.
Event types
The table below lists each event type and its target type. To filter by resource, pass a target type astarget_type or a single resource’s ID as target.
New event types are added over time, so if you don’t filter by
action, expect actions that aren’t in this table. For a given instance, instance.created, instance.running, and instance.terminated appear in that order. An instance terminated while still awaiting allocation has no instance.running event.
Consuming the stream
List events withGET /preview/v2/events. Events are returned oldest first, up to limit per request. limit defaults to 50 and is capped at 200. To fetch the next page, pass the response’s cursor back as starting_after. has_more tells you whether more events are already available.
When data is empty and has_more is false, you have read everything so far. That response carries no cursor, so keep the one you sent and poll with it again later.
Filter with action for an exact event type, target for one resource, target_type for one type of resource, and since and until for inclusive bounds on occurred_at, given as Unix timestamps. Filters combine, so a single request can ask for one event type on one resource.