API reference
Accept a lease
The runner accepts its lease with its current fencing token and the facts the Running gate reads.
Needs scope coordinator:runner.
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.
lease_id*stringThe lease's id, lse_ and a ULID, from Runner heartbeat.
iohr.coordinator.v1.AcceptLeaseRequest; path variables override their fields
application/json- body
iohr.coordinator.v1.AcceptLeaseRequest
account_id?stringcaps_set?booleanenv_scrubbed?booleanfencing_token?stringint64lease_id?stringworktree_fresh?booleanworktree_is_main_checkout?booleaniohr.coordinator.v1.AcceptLeaseResponse
application/json- response
iohr.coordinator.v1.AcceptLeaseResponse
lease?iohr.coordinator.v1.Lease
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.coordinator.acceptLease("<lease_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.
{ "lease": { "accepted_at": "string", "expired_at": "string", "expires_at": "string", "fencing_token": "string", "heartbeat_at": "string", "job_id": "string", "lease_id": "string", "progress_tool": "string", "progress_turns": 0, "released_at": "string", "runner_id": "string", "taken_at": "string", "turn_id": "string" }}