API reference
Report progress on an approval
Report a step: started with the payload as you see it now (a mismatch makes the approval stale and nothing may run), step, answered for a question, done, failed or stale.
Needs scope approvals:write.
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.
approval_id*stringThe approval.
iohr.approvals.v1.AddProgressRequest; path variables override their fields
application/json- body
iohr.approvals.v1.AddProgressRequest
account_id?stringapproval_id?stringexpected_state?stringnote?stringobserved?iohr.approvals.v1.Payload
runner?iohr.approvals.v1.RunnerSignature
step?stringiohr.approvals.v1.AddProgressResponse
application/json- response
iohr.approvals.v1.AddProgressResponse
approval?iohr.approvals.v1.Approval
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.approvals.addProgress("<approval_id>", { expected_state: "<expected_state>", note: "<note>", step: "<step>", }); console.log(value);} 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.
{ "approval": { "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" }}