Sign in
Docs
API referenceCoordinator

API reference

Lease heartbeat

Have a token? Manage tokens in the console
POST
/v1/coordinator/leases/{lease_id}/heartbeat

Keep a lease alive for 90 s more, with the provider's turns so far and the tool it is in. A stale token is refused.

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

lease_id*string

The lease's id, lse_ and a ULID, from Runner heartbeat.

Request Body

iohr.coordinator.v1.LeaseHeartbeatRequest; path variables override their fields

application/json
  1. body

iohr.coordinator.v1.LeaseHeartbeatRequest

account_id?string
fencing_token?string
Formatint64
lease_id?string
progress_tool?string
progress_turns?integer
Formatint32

Response Body

iohr.coordinator.v1.LeaseHeartbeatResponse

application/json
  1. response

iohr.coordinator.v1.LeaseHeartbeatResponse

heartbeat_interval_seconds*integer
Formatint32
lease?

iohr.coordinator.v1.Lease

stop*boolean
stop_reason*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.coordinator.leaseHeartbeat("<lease_id>", { progress_tool: "<progress_tool>" });  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
{  "heartbeat_interval_seconds": 0,  "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"  },  "stop": true,  "stop_reason": "string"}