Domains-domainName-nameservers:GET
From Hostway API Documentation
GET /domains/{domainName}/nameservers
Get the current name servers used to serve the Domain Name System (DNS) records for the domain. Name servers are a set of 0 to 13 distinct hostnames that may be assigned to a domain. Once the name servers are modified using this command, the changes are sent immediately to the registry. However these changes may take several hours to propagate depending on the individual zone files and possible registry zone file publication delays.
Contents |
Request
PUT /domains/{domainName}/nameservers
URI Parameters
- domainName - string
- The domain name. IE: example.com is a valid domain name, whereas http://www.example.com or www.example.com are not. If the domain name is invalid, or is otherwise not registerable such as for a non-existent or non-supported TLD, an error will be returned. Domain names are case insensitive. The domain name must be an open or suspended product under the authenticated franchise.
Request Headers
None.
Request Body
None
Response
Status Code
- 200 OK
- Domain nameservers successfully updated
- 400 Bad Request
- The domain name, or one of the given hostnames is not valid or is not a registered name server at the registry.
- The request was not completed even if one or more of the name servers is considered valid.
- 403 Forbidden
- Domain is not registered in this account and cannot be accessed.
- 404 Not Found
- No domain records found for the given domain name.
Response Body
- Name server array
- An array (list) of name server host names. Name servers are assigned in the order listed.
- Example: ["a.dns.hostway.net","b.dns.hostway.net"]
Example getting nameservers on a domain.
Request
GET /domains/example.com/nameservers
Response
200 OK Content-Type: application/json; charset=UTF-8 ["ns0.example.com","ns1.example.com"]
See also