Sign in
Docs
API referenceSchedules

API reference

Get a schedule

Have a token? Manage tokens in the console
GET
/v1/schedules/{schedule_id}

One schedule with its layers and the overrides that have not ended.

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

schedule_id*string

The schedule.

Query Parameters

account_id?string

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

Response Body

iohr.schedules.v1.GetResponse

application/json
  1. response

iohr.schedules.v1.GetResponse

schedule?

iohr.schedules.v1.Schedule

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.schedules.get("<schedule_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
{  "schedule": {    "account_id": "string",    "created_at": "string",    "created_by": "string",    "default_responder": {      "id": "string",      "kind": "string"    },    "description": "string",    "layers": [      {        "intervals": [          {            "days": "string",            "end": "string",            "start": "string"          }        ],        "layer_id": "string",        "name": "string",        "responders": [          {            "id": "string",            "kind": "string"          }        ],        "rotation": {          "anchor": "string",          "cadence": "string",          "every": 0,          "handover": "string",          "handover_day": "string"        },        "scope": [          "string"        ]      }    ],    "name": "string",    "overrides": [      {        "created_at": "string",        "created_by": "string",        "end": "string",        "note": "string",        "override_id": "string",        "responder": {          "id": "string",          "kind": "string"        },        "scope": [          "string"        ],        "start": "string"      }    ],    "schedule_id": "string",    "timezone": "string",    "updated_at": "string",    "updated_by": "string",    "version": 0  }}