Skip to main content
GET
/
dns
/
v2
/
zones
/
{name}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
zone = client.dns.zones.get(
    "name",
)
print(zone.id)
{
  "contact": "<string>",
  "dnssec_enabled": true,
  "enabled": true,
  "expiry": 123,
  "id": 123,
  "meta": {},
  "name": "<string>",
  "nx_ttl": 123,
  "primary_server": "<string>",
  "records": [
    {
      "name": "<string>",
      "short_answers": [
        "<string>"
      ],
      "ttl": 123,
      "type": "<string>"
    }
  ],
  "refresh": 123,
  "retry": 123,
  "rrsets_amount": {
    "dynamic": {
      "healthcheck": 123,
      "total": 123
    },
    "static": 123,
    "total": 123
  },
  "serial": 123,
  "status": "<string>"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

name
string
required

Response

ItemZoneResponse

Complete zone info with all records included

contact
string

email address of the administrator responsible for this zone

dnssec_enabled
boolean

describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone

enabled
boolean
default:true
expiry
integer<uint64>

number of seconds after which secondary name servers should stop answering request for this zone

id
integer<uint64>

ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.

meta
object

arbitrarily data of zone in json format

name
string

name of DNS zone

nx_ttl
integer<uint64>

Time To Live of cache

primary_server
string

primary master name server for zone

records
object[]
refresh
integer<uint64>

number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.

retry
integer<uint64>

number of seconds after which secondary name servers should retry to request the serial number

rrsets_amount
object
serial
integer<uint64>

Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.

status
string