Sign in
Docs
API referenceAgents

API reference

List deployments

Have a token? Manage tokens in the console
GET
/v1/accounts/orgs/{org_id}/deployments

What each service runs per environment against the head of its repository's default branch: counts of services that are current, behind (merged work waits for a deploy) or unknown (no head recorded), then each service's commit, when it was deployed and its state, environment then service in name order. Filter by environment or status; paged with page_size (0 means 100, at most 500) and next_page_token.

Needs scope agents: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

org_id*string

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

Query Parameters

environment?string
status?string
page_size?integer
Formatint32
page_token?string

Response Body

iohr.agents.v1.ListDeploymentsResponse

application/json
  1. response

iohr.agents.v1.ListDeploymentsResponse

behind*integer
Formatint32
current*integer
Formatint32
deployments*array<>
next_page_token*string
services*integer
Formatint32
unknown*integer
Formatint32
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  for await (const agentsDeployment of api.agents.allListDeployments("<org_id>")) {    console.log(agentsDeployment);  }} 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
{  "behind": 0,  "current": 0,  "deployments": [    {      "commit": "string",      "deployed_at": "string",      "environment": "string",      "head_commit": "string",      "head_recorded_at": "string",      "recorded_by": "string",      "repository": "string",      "service": "string",      "source": "string",      "state": "string"    }  ],  "next_page_token": "string",  "services": 0,  "unknown": 0}