API reference
Get an incident
One incident with its postmortem: what happened, its root cause and impact, its timeline and what follows. Another account's is not found.
Needs scope incidents:read.
bearerAuthorizationBearer <token>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.
org_id*stringThe account's id: org in GET /v1/me.
incident_id*stringThe incident's id, inc_ and 26 characters, from List incidents.
iohr.incidents.v1.GetIncidentResponse
application/json- response
iohr.incidents.v1.GetIncidentResponse
incident?iohr.incidents.v1.Incident
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try { const { value } = await api.incidents.getIncident("<org_id>", "<incident_id>"); console.log(value);} catch (e) { if (!(e instanceof ApiError)) throw e; console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);}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.
{ "incident": { "acknowledged_at": "string", "acknowledged_by": "string", "acknowledged_by_email": "string", "category": "string", "created_at": "string", "created_by": "string", "detected_at": "string", "duration_secs": "string", "figures": { "acknowledge_secs": "string", "error_rate": 0.1, "failed_runs": "string", "runs": "string" }, "incident_id": "string", "linked_provider": "string", "linked_url": "string", "monitors": [ "string" ], "org_id": "string", "permissions": { "can_acknowledge": true, "can_delete": true, "can_edit": true, "can_publish": true }, "postmortem": { "action_items": [ { "due": "string", "item_id": "string", "link": "string", "owner": "string", "status": "string", "title": "string" } ], "contributing": "string", "detection": "string", "diagnosis": "string", "evidence": [ { "kind": "string", "label": "string", "ref": "string", "url": "string" } ], "impact": "string", "mistakes": "string", "open_items": "string", "record": { "evidence_json": "string", "preface": "string", "record_id": "string", "scenarios": "string", "source": "string" }, "repair": "string", "response": "string", "root_cause": "string", "summary": "string", "timeline": [ { "at": "string", "entry_id": "string", "evidence_ref": "string", "kind": "string", "label": "string", "text": "string" } ], "verification": "string", "went_badly": "string", "went_well": "string" }, "resolved_at": "string", "responders": [ "string" ], "severity": 0, "source": "string", "started_at": "string", "state": "string", "status": "string", "tags": { "property1": "string", "property2": "string" }, "title": "string", "updated_at": "string", "updated_by": "string", "updated_by_email": "string", "version": 0 }}List incidents GET
The account's incidents, newest first: what happened, when it started, was detected and resolved, its severity (1 is the worst), status, duration and the monitors it touched. Open to keys at the incidents launch. Needs scope `incidents:read`.
List an incident's versions GET
Every saved version of an incident, newest first: its number, who saved it, when, and what changed. Needs scope `incidents:read`.