Dns-zone:GET
From Hostway API Documentation
Revision as of 13:34, 30 May 2016 by Corinne.chui (Talk | contribs)
GET /dns/{zone}
Returns the details of a DNS zone.
Contents |
Request
GET /dns/{zone}
Parameters
- zone - string
- The name of the DNS zone.
Request Headers
- Authorization
- Base64-encoded username:password string
Response
Status Code
- 200 OK
- Success
- 401 Unauthorized
- The server could not verify the credentials from the authorization header.
- 403 Forbidden
- The server denies the access to the resource.
- 404 Not Found
- The specified zone does not exist.
Response Body
{ "minimumTTL": {minimumTTL}, "retry": {retry}, "name": "{zone}", "primaryNS": "{primaryNS}", "refresh": {refresh}, "expire": {expire}, "emailAddress": "{emailAddress}", "ttl": {ttl}, "serial": {serial}, "links": [ {"href": "https://api.hostway.com/dns/{zone}", "rel": "self"}, {"href": "https://api.hostway.com/dns/{zone}/records", "rel": "related"} ] }
Examples
Request:
GET /dns/test.com
Response:
401 Unauthorized
Request:
GET /dns/unknown-zone.com Authorization: Basic {base64_encoded(username:password)}
Response:
403 Forbidden { "forbidden": {"message": "Unauthorized: Dns failed permission check", "code": 403, "details": ""} }
Request:
GET /dns/test.com Authorization: Basic {base64_encoded(username:password)}
Response:
200 OK { "minimumTTL": 300, "retry": 7200, "name": "test.com.", "links": [ {"href": "http://127.0.0.1/dns/test.com/", "rel": "self"}, {"href": "http://127.0.0.1/dns/test.com/records", "rel": "related"} ], "primaryNS": "a.dns.hostway.net.", "refresh": 28800, "expire": 604800, "emailAddress": "hostmaster.siteprotect.com.", "ttl": 14400, "serial": 1359151749 }
See also