Sign in
Docs
API referenceDNS

API reference

Apply a DNS plan

Have a token? Manage tokens in the console
POST
/v1/dns/orgs/{org_id}/plans/{plan_id}/apply

Apply a plan from Plan DNS changes. The domain check runs again. A plan that has expired, or whose records have changed since it was made, is refused. Until approvals exist, applying is turned off in the deployment and the connection refuses the write too: the answer is a failed precondition, the plan stays planned and nothing is sent.

Needs scope dns:write.

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.

plan_id*string

The plan's id, from Plan DNS changes.

Request Body

iohr.dns.v1.ApplyChangesRequest; path variables override their fields

application/json
  1. body

iohr.dns.v1.ApplyChangesRequest

org_id?string
plan_id?string

Response Body

iohr.dns.v1.ApplyChangesResponse

application/json
  1. response

iohr.dns.v1.ApplyChangesResponse

plan?

iohr.dns.v1.Plan

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.dns.applyChanges("<org_id>", "<plan_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
{  "plan": {    "applied_at": "string",    "applied_by": "string",    "changes": [      {        "after": {          "comment": "string",          "content": "string",          "id": "string",          "name": "string",          "priority": 0,          "proxied": true,          "ttl": 0,          "type": "string"        },        "before": {          "comment": "string",          "content": "string",          "id": "string",          "name": "string",          "priority": 0,          "proxied": true,          "ttl": 0,          "type": "string"        },        "op": "string",        "record_id": "string"      }    ],    "connection_id": "string",    "created_at": "string",    "created_by": "string",    "error": "string",    "expires_at": "string",    "id": "string",    "org_id": "string",    "state": "string",    "zone_id": "string",    "zone_name": "string"  }}