Creating a Primary Zone in 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/ POST — Create a primary zone.
HTTP Action — POST
URI — https://api.dynect.net/REST/Zone/<zone>/ |
Arguments — Click for More Info
- string
rname — Required. Administrative contact for this zone.
- string
serial_style — The style of the zone’s serial.
Valid values:
increment – Serials are incremented by 1 on every change. Default setting.
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
ttl — Required. Default TTL (in seconds) for records in the zone.
|
Response — Click for More Info
- integer
task_id – The number assigned to the task to create a primary zone.
- integer
serial — The current serial number of the zone.
- string
serial_style — The style in which serial numbers will be generated for this zone.
Valid values: increment, epoch, day, minute
- string
zone — The name of the requested zone.
- string
zone_type — Indicates whether the zone created is Primary or Secondary.
|
SOAP Syntax
Click to view all SOAP Commands |
CreateZone — Create a primary zone. |
Arguments — Click for More Info
- string
rname — Required. Administrative contact for this zone.
- string
serial_style — The style of the zone’s serial.
Valid values:
increment – Serials are incremented by 1 on every change. Default setting.
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
token — Required. The session identifier.
- string
ttl — Required. Default TTL (in seconds) for records in the zone.
- string
zone — Required. Name of the zone to create.
|
Response — Click for More Info
- hash
data
- integer
serial — The current serial number of the zone.
- string
serial_style — The style in which serial numbers will be generated for this zone.
Valid Values: increment, epoch, day, minute
- string
zone — The name of the requested zone.
- string
zone_type — Indicates whether the zone created is Primary or Secondary.
|
Example Request — Click for More Info
{
'rname' => 'admin.example.com',
'token' => 'asdlkfjasl23j4879afa',
'ttl' => '3600',
'zone' => 'example.com',
}
|
DNS API Knowledge Base