Description
Create a record for each domain.
Request URL
Designate API v1.0 POST /v1/domains/(uuid: domain_id)/records
Request Paramters
Parameter | Value | Style | Type | Description |
---|---|---|---|---|
X-Auth-Token | - | header | string | User Token |
name | - | plain | string | Record Name |
type | [A/AAAA/MX/CNAME/TXT/SRV/NS/PTR] | plain | string | Record Type |
data | - | plain | string | Record Data |
priority | - | plain | int | Priority MX/SRV record required |
ttl(Optional) | - | plain | int | TTL(second) |
description(Optional) | - | plain | string | Description |
gslb_region(Optional) | [JP/US/SG/AUTO(auto allocation)] | plain | string | GSLB Region Code In case of GSLB record, enter one of the following : gslb_region、weight、check |
gslb_weight(Optional) | [0~255] | plain | int | GSLB Priority In case of GSLB record, enter one of the following : gslb_region、weight、check |
gslb_check(Optional) | [0:OFF/PortNo.] | plain | int | GSLB Health Check Port In case of GSLB record, enter one of the following : gslb_region、weight、check |
Response Paramters
Parameter | Value | Style | Type | Description |
---|---|---|---|---|
domain_id | - | plain | UUID | Domain ID |
id | - | plain | string | Record ID |
name | - | plain | string | Record Name |
type | [A/AAAA/MX/CNAME/TXT/SRV/NS/PTR] | plain | string | Record Type |
created_at | - | plain | string | Creation Date |
updated_at | - | plain | string | Update Date |
ttl | - | plain | int | TTL(second) |
data | - | plain | string | Record Data |
priority | - | plain | string | Priority |
description | - | plain | string | Description |
gslb_region | [JP/US/SG] | plain | string | GSLB Region Code |
gslb_weight | [0~255] | plain | int | GSLB Priority |
gslb_check | [0:OFF/PortNo.] | plain | int | GSLB Health Check Port |
Request Json
{ "name": "www.example.com.", "type": "A", "data": "192.0.2.3", "gslb_check": 1, "gslb_region": "JP", "gslb_weight": 250 }
Normal response codes
200 - OK
Error response codes
400 Invalid Object
401 Access Denied
404 Not Found
409 Duplicate Record
Example
curl --include https://dns-service.tyo1.cloud.z.com/v1/domains/89acac79-38e7-497d-807c-a011e1310438/records -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" -d { "name": "www.example.com.", "type": "A", "data": "192.0.2.3", "gslb_check": 1, "gslb_region": "JP", "gslb_weight": 250 }
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 399 Location: http://localhost:9001/v1/domains/89acac79-38e7-497d-807c-a011e1310438/records/2e32e609-3a4f-45ba-bdef-e50eacd345ad Date: Fri, 02 Nov 2012 19:56:26 GMT { "id": "2e32e609-3a4f-45ba-bdef-e50eacd345ad", "name": "www.example.com.", "type": "A", "created_at": "2012-11-02T19:56:26.366792", "updated_at": null, "domain_id": "89acac79-38e7-497d-807c-a011e1310438", "ttl": null, "data": "192.0.2.3", "gslb_check": 1, "gslb_region": "JP", "gslb_weight": 250 }