Description
Import zone files.

Request URL

Designate API v2.0

POST /v2/zones

Request Paramters

Parameter Value Style Type Description
X-Auth-Token - header string User Token

Request Zone File

$ORIGIN example.com.
$TTL 3600
example.com. IN SOA ns.example.com. postmaster.example.com. 1234567890 10800 1800 604800 86400
example.com. IN NS ns.example.com.
example.com. IN MX 10 mail.example.com.
ns.example.com. IN A 1.2.3.4
mail.example.com. IN A 1.2.3.4

Response Paramters

Parameter Value Style Type Description
email - plain string Email Address
id - plain UUID Domain ID
links - plain string Zone URL Link
name - plain string Domain Name
pool_id - plain UUID -
project_id - plain UUID Tenant ID
serial - plain int Serial Number
ttl - plain int TTL(second)
created_at - plain string Creation Date
version - plain int Version

Normal response codes

201 – Created

Error response codes

415 – Unsupported Media Type
400 – Bad request

Example

curl --include https://dns-service.tyo1.cloud.z.com/v2/zones
-X POST
-H "Content-type: text/dns"
-H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140"
--data-binary @file
HTTP/1.1 201 Created
Content-Type: application/json

{
    "zone": {
        "email": "nsadmin@example.com",
        "id": "6b78734a-aef1-45cd-9708-8eb3c2d26ff1",
        "links": {
            "self": "https://dns-service.tyo1.cloud.z.com/v2/zones/6b78734a-aef1-45cd-9708-8eb3c2d26ff1"
        },
        "name": "example.com.",
        "pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
        "project_id": "d7accc2f8ce343318386886953f2fc6a",
        "serial": 1404757531,
        "ttl": "42",
        "created_at": "2014-07-07T18:25:31.275934",
        "version": 1
    }
}