MENU

Description
ゾーンファイルをインポートする

Request URL

Designate API v2.0

POST /v2/zones

Request Paramters

Parameter Value Style Type Description
X-Auth-Token - header string Userトークン

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 Eメールアドレス
id - plain UUID ドメインID
links - plain string ゾーンURLリンク
name - plain string ドメイン名
pool_id - plain UUID -
project_id - plain UUID テナントID
serial - plain int シリアル値
ttl - plain int TTL(秒)
created_at - plain string 作成日
version - plain int バージョン

Normal response codes

201 – Created

Error response codes

415 – Unsupported Media Type
400 – Bad request

Example
※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。

  • REQ
curl --include https://dns-service.tyo1.conoha.io/v2/zones \
-X POST \
-H "Content-Type: text/dns" \
-H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140"
--data-binary @file
  • RES
HTTP/1.1 201 Created
Content-Type: application/json

{
    "zone": {
        "email": "[email protected]",
        "id": "6b78734a-aef1-45cd-9708-8eb3c2d26ff1",
        "links": {
            "self": "https://dns-service.tyo1.conoha.io/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
    }
}