Sign in
Docs
API referenceDNS

API reference

List DNS zones

Have a token? Manage tokens in the console
GET
/v1/dns/orgs/{org_id}/connections/{connection_id}/zones

The zones an account's Cloudflare connection can reach, read with the connection's own token: each zone's id, name, Cloudflare status, and whether a verified domain of the account covers it (verified, domain). A plan can be made only for a covered zone.

Needs scope dns: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.

connection_id*string

The connection's id, con_ and a ULID, from List connections.

Query Parameters

name?string

Only the zone with this exact name: example.com; empty for every zone.

page_size?integer

At most this many; 0 means 50, above 50 means 50.

Formatint32
page_token?string

From the previous page's next_page_token.

Response Body

iohr.dns.v1.ListZonesResponse

application/json
  1. response

iohr.dns.v1.ListZonesResponse

next_page_token*string
zones*array<>
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 zone of api.dns.allListZones("<org_id>", "<connection_id>")) {    console.log(zone);  }} 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
{  "next_page_token": "string",  "zones": [    {      "account_name": "string",      "domain": "string",      "id": "string",      "name": "string",      "status": "string",      "verified": true    }  ]}