Sign in
Docs
API referenceApprovals

API reference

Get an approval

Have a token? Manage tokens in the console
GET
/v1/approvals/{approval_id}

One approval with its frozen payload, the decision and its timeline.

Needs scope approvals: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.

Path Parameters

approval_id*string

The approval.

Query Parameters

account_id?string

A team you belong to; empty for your own account.

Response Body

iohr.approvals.v1.GetResponse

application/json
  1. response

iohr.approvals.v1.GetResponse

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.get("<approval_id>");  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.

Example Response
{  "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"  }}