Dns-zone:GET

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
m (1 revision)
 
(One intermediate revision by one user not shown)
Line 21: Line 21:
 
;401 Unauthorized
 
;401 Unauthorized
 
: The server could not verify the credentials from the authorization header.
 
: The server could not verify the credentials from the authorization header.
 +
 +
;403 Forbidden
 +
: The server denies the access to the resource.
  
 
;404 Not Found
 
;404 Not Found

Latest revision as of 14:34, 30 May 2016

[edit] GET /dns/{zone}

Returns the details of a DNS zone.

Contents

[edit] Request

GET /dns/{zone}

[edit] Parameters

zone - string
The name of the DNS zone.

[edit] Request Headers

Authorization
Base64-encoded username:password string

[edit] Response

[edit] 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.

[edit] 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"}
  ]
}

[edit] 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
}
 

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox