API Endpoint Reference / Farm Events
Replay durable Farm Events
GET https://api.printhiv3d.com/v1/events
Operation ID listFarmEvents. Requires the events:read or events:read:<domain> API key scope.
Reads the durable Farm Events of the organization of the API key, or of the signed-in session, oldest first. An API key needs `events:read` or `events:read:*` to read every kind, or `events:read:<domain>` to read the kinds of one domain, where the domain is the first segment of a kind, such as `job` or `bov`.
It reads the same log as the live stream, and an event's `cursor` is the `since` of the live stream, so a reader can read a page and then subscribe from it. Pass that cursor as `since` on the stream: a stream without `since` starts at its head and loses the events in between. Pass the `nextSince` of a page as `since` to read the next page, and stop when `nextSince` reaches `head`, the latest cursor. A `since` above `head`, as after a log rollback, returns 409 `EVENTS_CURSOR_AHEAD` with the `head`, as the live stream does. Rebuild the state you track, then read on from `head`, or from `0`, and do not subscribe from your old cursor. `kinds` takes exact durable kind names, comma-separated, and a pattern such as `bov.*` returns 400. Kinds that are not durable, such as `printer.telemetry.sampled`, are not in the log. `printer.online` and `printer.offline` are left out unless you name them.
Without `kinds`, a domain grant reads the kinds of its domain. A `kinds` value that names a kind outside the grant returns 403 `EVENTS_READ_SCOPE_REQUIRED`. A key with only `read`, `control`, or `dangerous` grants nothing here. A Host credential is refused first, as on the live stream: a key bound to a Host, or one with the `host` scope or the legacy `*` scope, returns 403 `EVENTS_HOST_KEY_REFUSED`, with or without an events grant.
`GET /v1/organizations/{organizationId}/events` is the older form of this read, with numeric cursors.
Parameters
| Name | In | Type | Required | Description |
|---|
since | query | string | No | The decimal text of the last cursor you hold, digits only and without a leading zero. Events after it are returned. The default is `0`, the start of the log. A value that is not a cursor, or is above 9007199254740991, returns 400 `INVALID_EVENTS_QUERY`. A cursor above the head of the log returns 409 `EVENTS_CURSOR_AHEAD`. |
limit | query | string | No | 1 to 200. Default 100. |
kinds | query | string | No | Comma-separated exact durable kinds, such as `job.completed,bov.concluded`. |
Responses
| Status | Description |
|---|
200 | One page of events, oldest first. |
400 | The query is not valid. `code` is `INVALID_EVENTS_QUERY`. |
401 | The request carries no valid API key or session. |
403 | The credential reads none of the requested kinds, and `code` is `EVENTS_READ_SCOPE_REQUIRED`, or it is a Host credential, and `code` is `EVENTS_HOST_KEY_REFUSED`. |
409 | `since` is above the head of the log. `code` is `EVENTS_CURSOR_AHEAD`. Rebuild the state you track, then read on from `head`. |
200 response fields
| Field | Type | Required | Description |
|---|
events | object[] | Yes | |
head | string | Yes | The organization's latest cursor, or `0` when it has no events. |
nextSince | string | Yes | Pass as `since` for the next page. It equals the cursor of the last event of a full page, and it jumps to `head` when the page is short. |
400 response fields
| Field | Type | Required | Description |
|---|
error | string | Yes | |
code | string | No | |
message | string | No | |
requestId | string | No | |
401 response fields
| Field | Type | Required | Description |
|---|
error | string | Yes | |
code | string | No | |
message | string | No | |
requestId | string | No | |
403 response fields
| Field | Type | Required | Description |
|---|
error | string | Yes | |
code | string | No | |
message | string | No | |
requestId | string | No | |
409 response fields
| Field | Type | Required | Description |
|---|
error | string | Yes | |
code | string | Yes | |
message | string | No | |
requestId | string | No | |
head | string | Yes | The latest cursor of the log, which is below `since`. |
Example 200 response
{
"events": [
{
"id": "1c7e4a92-5b0d-4f38-a6c1-8d2e9b3f7a54",
"orgId": "3b9e4d71-0c2f-4a58-8e6d-91f2a7c4b605",
"kind": "job.completed",
"schemaVersion": 1,
"cursor": "41",
"prev": "40",
"occurredAt": "2026-11-04T18:20:00.000Z",
"recordedAt": "2026-11-04T18:20:00.412Z",
"scope": {
"type": "job",
"jobId": "1042",
"printerId": "7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13"
},
"scopeRefs": [
"job:1042",
"printer:7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13"
],
"payload": {
"jobId": "1042",
"printerId": "7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13",
"jobName": "phone-stand.3mf",
"status": "COMPLETED",
"previousStatus": "IN_PROGRESS",
"printCompletedAt": "2026-11-04T18:20:00.000Z"
},
"correlationId": null,
"actor": {
"type": "hive_link",
"hostId": "5e9d1b73-2a4c-4f80-b6d7-0c3a8e1f4b92"
},
"media": [],
"actions": [],
"idempotencyKey": "job.completed:1042:evt-41"
},
{
"id": "7a3c9e15-8d2b-4c60-b4f7-1e5a0d9c3b86",
"orgId": "3b9e4d71-0c2f-4a58-8e6d-91f2a7c4b605",
"kind": "printer.ready",
"schemaVersion": 1,
"cursor": "42",
"prev": "41",
"occurredAt": "2026-11-04T18:31:00.000Z",
"recordedAt": "2026-11-04T18:31:00.208Z",
"scope": {
"type": "printer",
"printerId": "7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13",
"jobId": null
},
"scopeRefs": [
"printer:7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13"
],
"payload": {
"printerId": "7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13",
"releasedJobId": "1042",
"readySource": "operator_override",
"readyUpdatedSource": "operator"
},
"correlationId": null,
"actor": {
"type": "hive_link",
"hostId": "5e9d1b73-2a4c-4f80-b6d7-0c3a8e1f4b92"
},
"media": [],
"actions": [],
"idempotencyKey": "printer.ready:printer:evt-42"
}
],
"head": "42",
"nextSince": "42"
}