Domains-domainName-hosts:POST
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 87) |
(→Example of updating hosts) |
||
Line 56: | Line 56: | ||
'''Response''' | '''Response''' | ||
<nowiki> | <nowiki> | ||
− | + | 204 No Content | |
</nowiki> | </nowiki> | ||
Revision as of 09:09, 20 December 2013
POST /domains/{domainName}/hosts
Add or update the hosts list of a domain. If a host doesn't exist it will be created, otherwise its IP address will be updated.
Contents |
Request
POST /domains/{domainName}/hosts
Parameters
None.
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
Content-Type: application/json
Request Body
The hosts for the domain.
Parameters
- hosts - list
- The list of hosts
- name - string
- The host name
- address - string
- The IP address of the host.
Response
Status Code
- 204 No Content
- Returned on success
- 404 Not Found
- No domain records found for the given domain name.
- 500 Internal Server Error
- An error has occurred with the registry,
Response Body
The hosts to set for the domain.
Example of updating hosts
Request
Content-Length: 0 POST /domains/example.com/hosts {"hosts": [{ "name": "ns2.ng-test-fitnesse-20130202-0605.com", "address": "133.45.67.2"}]}
Response
204 No Content
See also