Sign in
Docs
API referenceConnections

API reference

Mint a runner GitHub token

Have a token? Manage tokens in the console
POST
/v1/accounts/orgs/{org_id}/connections/github/runner-token

A short-lived GitHub token for the lease's one repository, with contents and pull_requests write, minted from the account's installation of InOrbit's GitHub App and never stored. Only the runner holding the lease, with its current fencing token. The answer carries the token and its expiry, or a reason (not_installed, not_listed, needs_permission, rate_limited, invalid_name, unavailable) and no token.

Needs scope coordinator:runner.

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

org_id*string

The account's id: org in GET /v1/me.

Request Body

iohr.connections.v1.MintRunnerGithubTokenRequest; path variables override their fields

application/json
  1. body

iohr.connections.v1.MintRunnerGithubTokenRequest

fencing_token?string
Formatint64
lease_id?string
org_id?string

Response Body

iohr.connections.v1.MintRunnerGithubTokenResponse

application/json
  1. response

iohr.connections.v1.MintRunnerGithubTokenResponse

detail*string
expires_at*string
reason*string
repository*string
token*string
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.connections.mintRunnerGithubToken("<org_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
{  "detail": "string",  "expires_at": "string",  "reason": "string",  "repository": "string",  "token": "string"}