Dns-zone-records-recordId:PUT
From Hostway API Documentation
Revision as of 17:04, 18 February 2013 by Mike.robski (Talk | contribs)
PUT /dns/{zone}/records/{recordId}
Update an existing zone record.
Contents |
Request
PUT /dns/{zone}/records/{recordId}
Request Parameters
- zone - string
- The DNS zone of the record.
- recordId - string
- The uniques Id of the record.
URI Parameters
None.
Request Headers
- Content-Type
- application/json
- Authorization
- Base64-encoded username & password string
Request Body
A record
{ "name":{domain}, "type":"A", "address":{ip_address} }
AAAA record
{ "name":{domain}, "type":"AAAA", "address":{ipv6_address} }
NS record
{ "name":{domain}, "type":"NS", "nsdname":{ns_domain} }
TXT record
{ "name":{domain}, "type":"TXT", "data":{data} }
SRV record
{ "name":{domain}, "type":"SRV", "priority": {priority}, "weight": {weight}, "port": {port}, "target":{target} }
MX record
{ "name":{domain}, "type":"MX", "preference": {preference}, "exchange":{mx_domain} }
CNAME record
{ "name":{name}, "type":"CNAME", "cname":{domain} }
Response
Status Code
- 200 OK
- Success
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 409 Conflict
Response Body
None.
Examples
Unauthorized Request
Request
PUT /dns/test.com/records/1234 { "name": "test", "type": "CNAME", "cname": "otherdomain.com." }
Response
401 Unauthorized
Successful Update
Request
PUT /dns/test.com/records/1234 Authorization: Basic {base64_encoded(username:password)} { "name": "test1", "type": "CNAME", "cname": "otherdomain1.com." }
Response
200 OK { "name": "test1", "type": "CNAME", "cname": "otherdomain1.com." }
See also