Sign in
Docs
API referenceCoordinator

API reference

Watch the coordinator

SSE
GET https://api.inorbit.hr/v1/coordinator/picture/eventsAccept: text/event-stream; one data: line of JSON per event
WebSocket
wss://api.inorbit.hr/v1/ws{"type":"call","id":"1","method":"iohr.coordinator.v1.CoordinatorService/WatchCoordinator","body":{…}}
MQTT 5
wss://api.inorbit.hr/v1/mqttsubscribe to coordinator/picture/events
Have a token? Manage tokens in the console
GET
/v1/coordinator/picture/events

The picture as it changes, as server-sent events: a snapshot, then deltas with a rising seq. from_seq with the tier the last ended frame named resumes without a snapshot while the journal still holds it; any other tier gets a fresh snapshot marked resync. A stream lasts at most 15 minutes and never past the caller's token: it then ends with an ended frame (expired) carrying the seq and tier to resume from. A change of the caller's tier ends it the same way.

Needs scope coordinator:read.

Authorization

bearer
headerAuthorizationBearer <JWT>

An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.

Query Parameters

account_id?string
from_seq?string

Resume after this seq; 0 opens with a snapshot.

Formatint64
tier?string

The tier the last ended frame carried. Deltas are replayed only when it matches the caller's tier now.

Response Body

A stream of iohr.coordinator.v1.WatchCoordinatorResponse events, one JSON object per data:; a failure is an error event carrying Problem

text/event-stream
  1. response

iohr.coordinator.v1.WatchCoordinatorResponse

delta?

iohr.coordinator.v1.PictureDelta

ended?

iohr.coordinator.v1.PictureEnded

heartbeat?

iohr.coordinator.v1.PictureHeartbeat

snapshot?

iohr.coordinator.v1.CoordinatorPicture

import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  for await (const event of api.coordinator.watchCoordinator()) {    console.log(event);  }} catch (e) {  if (!(e instanceof ApiError)) throw e;  console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);  process.exitCode = 1;}

npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.

Example Response
{  "delta": {    "ask": {      "created_at": "string",      "created_by": "string",      "id": "string",      "job_count": 0,      "job_ids": [        "string"      ],      "kind": "string",      "links": [        "string"      ],      "planned": true,      "priority": 0,      "reason": "string",      "source": "string",      "state": "string",      "title": "string",      "wait_code": "string"    },    "at": "string",    "entity": "string",    "id": "string",    "job": {      "await_deadline": "string",      "await_kind": "string",      "compliance_pr": "string",      "created_at": "string",      "created_by": "string",      "has_lease": true,      "heartbeat_at": "string",      "hold_reason": "string",      "id": "string",      "kind": "string",      "lease_id": "string",      "mode": "string",      "model": "string",      "model_override_reason": "string",      "model_tier": "string",      "next_gate": "string",      "parent_job_id": "string",      "priority": 0,      "progress_pct": 0,      "progress_tool": "string",      "progress_turns": 0,      "repository": "string",      "runner_id": "string",      "security": true,      "stage": "string",      "tags": [        "string"      ],      "thread_id": "string",      "title": "string",      "updated_at": "string",      "user": "string"    },    "op": "string",    "open_item": {      "id": "string",      "kind": "string",      "next_action": "string",      "opened_at": "string",      "ref": "string",      "score": 0.1,      "source": "string",      "stub": true,      "title": "string",      "user": "string"    },    "plan": {      "counts": {        "done": 0,        "failed": 0,        "not_started": 0,        "running": 0,        "waiting_on_person": 0,        "waiting_on_pr": 0      },      "heartbeat_at": "string",      "owner": "string",      "plan_id": "string",      "progress": "string",      "prs": [        {          "ref": "string",          "state": "string",          "stub": true        }      ],      "release_stage": "string",      "running_jobs": 0,      "running_tool": "string",      "seq": "string",      "state": "string",      "stub": true,      "stuck": [        "string"      ],      "team": "string",      "title": "string",      "updated_at": "string",      "waiting_on": {        "ask_id": "string",        "kind": "string",        "ref": "string",        "since": "string"      }    },    "runner": {      "always_on": true,      "arch": "string",      "capacity": 0,      "id": "string",      "kinds": [        "string"      ],      "last_seen_at": "string",      "name": "string",      "os": "string",      "slots_used": 0,      "status": "string",      "user": "string",      "version": "string"    },    "seq": "string",    "transition": {      "actor": "string",      "at": "string",      "detail": "string",      "evidence": [        "string"      ],      "from_mode": "string",      "from_stage": "string",      "gate": "string",      "job": "string",      "kind": "string",      "outcome": "string",      "reason": "string",      "seq": 0,      "to_mode": "string",      "to_stage": "string"    }  },  "ended": {    "reason": "string",    "resume_seq": "string",    "tier": "string"  },  "heartbeat": {    "seq": "string"  },  "snapshot": {    "asks": [      {        "created_at": "string",        "created_by": "string",        "id": "string",        "job_count": 0,        "job_ids": [          "string"        ],        "kind": "string",        "links": [          "string"        ],        "planned": true,        "priority": 0,        "reason": "string",        "source": "string",        "state": "string",        "title": "string",        "wait_code": "string"      }    ],    "generated_at": "string",    "jobs": [      {        "await_deadline": "string",        "await_kind": "string",        "compliance_pr": "string",        "created_at": "string",        "created_by": "string",        "has_lease": true,        "heartbeat_at": "string",        "hold_reason": "string",        "id": "string",        "kind": "string",        "lease_id": "string",        "mode": "string",        "model": "string",        "model_override_reason": "string",        "model_tier": "string",        "next_gate": "string",        "parent_job_id": "string",        "priority": 0,        "progress_pct": 0,        "progress_tool": "string",        "progress_turns": 0,        "repository": "string",        "runner_id": "string",        "security": true,        "stage": "string",        "tags": [          "string"        ],        "thread_id": "string",        "title": "string",        "updated_at": "string",        "user": "string"      }    ],    "open_items": [      {        "id": "string",        "kind": "string",        "next_action": "string",        "opened_at": "string",        "ref": "string",        "score": 0.1,        "source": "string",        "stub": true,        "title": "string",        "user": "string"      }    ],    "plans": [      {        "counts": {          "done": 0,          "failed": 0,          "not_started": 0,          "running": 0,          "waiting_on_person": 0,          "waiting_on_pr": 0        },        "heartbeat_at": "string",        "owner": "string",        "plan_id": "string",        "progress": "string",        "prs": [          {            "ref": "string",            "state": "string",            "stub": true          }        ],        "release_stage": "string",        "running_jobs": 0,        "running_tool": "string",        "seq": "string",        "state": "string",        "stub": true,        "stuck": [          "string"        ],        "team": "string",        "title": "string",        "updated_at": "string",        "waiting_on": {          "ask_id": "string",          "kind": "string",          "ref": "string",          "since": "string"        }      }    ],    "recent_transitions": [      {        "actor": "string",        "at": "string",        "detail": "string",        "evidence": [          "string"        ],        "from_mode": "string",        "from_stage": "string",        "gate": "string",        "job": "string",        "kind": "string",        "outcome": "string",        "reason": "string",        "seq": 0,        "to_mode": "string",        "to_stage": "string"      }    ],    "resync": true,    "runners": [      {        "always_on": true,        "arch": "string",        "capacity": 0,        "id": "string",        "kinds": [          "string"        ],        "last_seen_at": "string",        "name": "string",        "os": "string",        "slots_used": 0,        "status": "string",        "user": "string",        "version": "string"      }    ],    "seq": "string",    "stages": [      "string"    ],    "tier": "string",    "tier_reason": "string"  }}