API reference
List approvals
An account's approvals, newest first.
Needs scope approvals: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?stringA team you belong to; empty for your own account.
status?stringpending, approved, denied, question, in_progress, done, failed, stale, or open for pending and question.
kind?stringpull_request, roll, review or document.
page_size?integerAt most this many; 0 means 50, above 200 means 200.
int32page_token?stringFrom the previous page's next_page_token.
repo?stringnumber?integerint32head?stringpayload_sha256?stringjob_id?stringiohr.approvals.v1.ListResponse
application/json- response
iohr.approvals.v1.ListResponse
approvals*array<>next_page_token*stringimport { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try { for await (const approval of api.approvals.allList()) { console.log(approval); }} 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.
{ "approvals": [ { "account_id": "string", "agent": "string", "approval_id": "string", "approve_means": "string", "asked_of": "string", "auto_policy_id": "string", "auto_policy_signature_sha256": "string", "context": { "canvas_id": "string", "commits": [ { "repo": "string", "resolved": true, "sha": "string", "subject": "string" } ], "diagram_ids": [ "string" ], "documents": [ { "document_id": "string", "kind": "string", "number": "string", "resolved": true, "space_id": "string", "title": "string" } ], "explanation": { "approve": "string", "deny": "string", "effect": { "kind": "string", "ships": true, "summary": "string", "touches": [ "string" ] }, "evidence": [ { "kind": "string", "language": "string", "path": "string", "text": "string", "title": "string", "url": "string" } ], "risk": { "level": "string", "text": "string" }, "what": "string", "why": "string" }, "job_id": "string", "no_context_reason": "string", "plan_id": "string", "plan_item": "string", "scene_document_id": "string" }, "corrected_at": "string", "correction": "string", "created_at": "string", "decided_at": "string", "decided_by": "string", "decided_on": "string", "decision_note": "string", "decision_proof": { "key_id": "string", "nonce": "string", "signature": "string", "signed_at": "string" }, "deny_means": "string", "github": "string", "kind": "string", "links": [ "string" ], "payload": { "auto_approve": { "scope": { "ask_kinds": [ "string" ], "max_priority": 0, "requesters": [ "string" ] }, "until": "string" }, "decision": { "needs_person": true, "options": [ "string" ] }, "document": { "document_id": "string", "space_id": "string", "version": 0 }, "pull_request": { "head": "string", "number": 0, "repo": "string", "title": "string" }, "review": { "url": "string" }, "roll": { "behind": 0, "deployments": [ "string" ], "gate": [ "string" ], "gate_tree": "string", "main_commit": "string", "main_subject": "string", "migrations": [ "string" ], "other_commits": 0, "prs": [ { "number": 0, "title": "string" } ], "rollback": [ "string" ], "running_commit": "string", "steps": [ "string" ] }, "run": { "action": "string", "argv": [ "string" ], "cmd": "string", "effect": "string", "expires_at": "string", "nonce": "string", "plan_sha256": "string", "roll": { "behind": 0, "deployments": [ "string" ], "gate": [ "string" ], "gate_tree": "string", "main_commit": "string", "main_subject": "string", "migrations": [ "string" ], "other_commits": 0, "prs": [ { "number": 0, "title": "string" } ], "rollback": [ "string" ], "running_commit": "string", "steps": [ "string" ] }, "runner_id": "string", "runner_public_key": "string", "schema_id": "string", "script_sha256": "string", "version": 0 }, "runner_enrollment": { "fingerprint": "string", "label": "string", "public_key": "string" } }, "payload_sha256": "string", "requested_by": "string", "status": "string", "summary": "string", "supersedes": "string", "timeline": [ { "at": "string", "by": "string", "device": "string", "note": "string", "step": "string", "via": "string" } ], "title": "string", "updated_at": "string", "via": "string" } ], "next_page_token": "string"}