Retrieving one or many zones using the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
Understanding How The API Works »
REST Syntax
Click to view all REST Resources |
Zone/ GET — Retrieves the list of available zones if no zone is specified in the URI. Specifying a zone in the URI means that information specific to that zone will be returned.
HTTP Action — GET
URIs:
Get one Zone — https://api.dynect.net/REST/Zone/<zone>/
Get all Zones — https://api.dynect.net/REST/Zone/
|
Arguments:
No Arguments.
|
Response:
Get one Zone — Click for More Info
- integer
serial — The current serial number of the zone
- string
serial_style — The style of the zone’s serial number.
Valid values:
increment – Serials are incremented by 1 on every change.
epoch – Serials will be the UNIX timestamp at the time of the publish.
day – Serials will be in the form of YYYYMMDDxx where xx is incremented by one for each change during that particular day.
minute – Serials will be in the form of YYMMDDHHMM.
- string
zone The name of the requested zone
- string
zone_type — Type of zone.
Valid values:
Primary
Secondary
Get all Zones — array of individual zone resources.
|
SOAP Syntax
Click to view all SOAP Commands |
GetOneZone — Retrieve information on the specified zone.
GetZones — Retrieve a list of all available zones.
|
Arguments:
GetOneZone:
string token — Required. The session identifier.
string zone — Required. Zone whose information will be retrieved.
GetZones:
string token — Required. The session identifier.
|
Response:
GetOneZone — Click for More Info
- hash
data
- string
serial — The current serial number of the zone
- string
serial_style — The style of the zone’s serial number.
Valid values:
increment – Serials are incremented by 1 on every change.
epoch – Serials will be the UNIX timestamp at the time of the publish.
day – Serials will be in the form of YYYYMMDDxx where xx is incremented by one for each change during that particular day.
minute – Serials will be in the form of YYMMDDHHMM.
- string
zone The name of the requested zone
- string
zone_type — Type of zone.
Valid values:
Primary
Secondary
GetZones — Click for More Info
- array
data
- string
serial — The current serial number of the zone.
- string
serial_style — The style of the zone’s serial number.
Valid values:
increment – Serials are incremented by 1 on every change.
epoch – Serials will be the UNIX timestamp at the time of the publish.
day – Serials will be in the form of YYYYMMDDxx where xx is incremented by one for each change during that particular day.
minute – Serials will be in the form of YYMMDDHHMM.
- string
zone The name of the requested zone.
- string
zone_type — Type of zone.
Valid values:
Primary
Secondary
|
Example Request(GetOneZone) — Click for More Info
{
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
|
Example Request(GetZones) — Click for More Info
{
'token' => 'asdlkfjasl23j4879afa',
}
|
DNS API Knowledge Base