API reference
Watch the plans overview
- SSE
- GET https://api.inorbit.hr/v1/coordinator/plan/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/WatchPlans","body":{…}}
- MQTT 5
- wss://api.inorbit.hr/v1/mqttsubscribe to coordinator/plan/events
The overview as it changes, as server-sent events from the same journal as the coordinator picture: a snapshot, then a delta per plan change with the new totals. from_seq with the tier the last ended frame named resumes while the journal holds it; a plan that leaves your sight arrives as a remove, and after a resume that cannot know what you were shown a fresh snapshot replaces the state. A stream lasts at most 15 minutes and never past the token.
Needs scope coordinator:read.
bearerAuthorizationBearer <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.
account_id?stringThe account's id: org in GET /v1/me.
from_seq?stringResume after this seq; 0 opens with a snapshot.
int64tier?stringThe tier the last ended frame carried.
A stream of iohr.coordinator.v1.WatchPlansResponse events, one JSON object per data:; a failure is an error event carrying Problem
text/event-stream- response
iohr.coordinator.v1.WatchPlansResponse
delta?iohr.coordinator.v1.PlanDelta
ended?iohr.coordinator.v1.PictureEnded
heartbeat?iohr.coordinator.v1.PictureHeartbeat
snapshot?iohr.coordinator.v1.GetPlansOverviewResponse
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.watchPlans()) { 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.
{ "delta": { "at": "string", "op": "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" } }, "seq": "string", "totals": { "by_progress": { "done": 0, "failed": 0, "not_started": 0, "running": 0, "waiting_on_person": 0, "waiting_on_pr": 0 }, "open_prs": 0, "plans": 0, "running_jobs": 0, "stuck": 0, "waiting_on_me": 0 } }, "ended": { "reason": "string", "resume_seq": "string", "tier": "string" }, "heartbeat": { "seq": "string" }, "snapshot": { "generated_at": "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" } } ], "seq": "string", "tier": "string", "totals": { "by_progress": { "done": 0, "failed": 0, "not_started": 0, "running": 0, "waiting_on_person": 0, "waiting_on_pr": 0 }, "open_prs": 0, "plans": 0, "running_jobs": 0, "stuck": 0, "waiting_on_me": 0 } }}