Sign in
Docs
API referenceApprovals

API reference

Get the auto-approve policy

Have a token? Manage tokens in the console
GET
/v1/approvals/auto-approve

The account's auto-approve policy: the latest one set, active or not (expired or revoked), or none. The same rights as List approvals.

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.

Query Parameters

account_id?string

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

Response Body

iohr.approvals.v1.GetAutoApprovePolicyResponse

application/json
  1. response

iohr.approvals.v1.GetAutoApprovePolicyResponse

policy?

iohr.approvals.v1.AutoApprovePolicy

rules?

iohr.approvals.v1.AutoApproveRules

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.getAutoApprovePolicy();  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
{  "policy": {    "active": true,    "approval_id": "string",    "approved_count": 0,    "created_at": "string",    "expires_at": "string",    "id": "string",    "last_approved_at": "string",    "revoked_at": "string",    "revoked_by": "string",    "scope": {      "ask_kinds": [        "string"      ],      "max_priority": 0,      "requesters": [        "string"      ]    },    "signature_sha256": "string",    "signed_at": "string",    "signed_by": "string",    "signed_by_key": "string"  },  "rules": {    "guards": [      "string"    ],    "hard_exact": [      "string"    ],    "hard_words": [      "string"    ],    "never_exact": [      "string"    ],    "never_kinds": [      "string"    ],    "never_words": [      "string"    ],    "opt_in_kinds": [      "string"    ],    "scope_kinds": [      "string"    ]  }}