Sign in
Docs
API referenceDNS

API reference

List DNS records

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

One zone's records as Cloudflare serves them: type, name, content, TTL, proxied, priority and comment.

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.

zone_id*string

The zone's id, from List DNS zones.

Query Parameters

type?string

Only records of this type: A, AAAA, CNAME, TXT, MX, NS; empty for all.

name?string

Only records with this exact name: www.example.com; empty for all.

page_size?integer

At most this many; 0 means 100, above 500 means 500.

Formatint32
page_token?string

From the previous page's next_page_token.

Response Body

iohr.dns.v1.ListRecordsResponse

application/json
  1. response

iohr.dns.v1.ListRecordsResponse

next_page_token*string
records*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 dnsRecord of api.dns.allListRecords("<org_id>", "<connection_id>", "<zone_id>")) {    console.log(dnsRecord);  }} 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",  "records": [    {      "comment": "string",      "content": "string",      "id": "string",      "name": "string",      "priority": 0,      "proxied": true,      "ttl": 0,      "type": "string"    }  ]}