October 24, 2018

Domains API

  API Reference

     

This section of the API covers adding and removing zone aliases. An alias is a domain that redirects to the primary domain for the zone. To set the primary domain go to the Zone section of the API documentation.


List Aliases

Retrieve a list of all aliases associated with a zone.

Example Request

$ curl https://api.nuevocloud.com/1.0/zones/www.example.com/aliases -u nc_apikey:

Example Response

[
"example.com"
]

Adding Aliases

Adds one or more aliases to a zone. An alias must be a valid unique domain name. It returns a list of all aliases associated with this zone.

Example Request

$ curl -X POST -d '[ "subdomain.example.com", "subdomain2.example.com" ]' https://api.nuevocloud.com/1.0/zones/www.example.com/aliases -u nc_apikey:

Example Response

[
"example.com",
"subdomain.example.com",
"subdomain2.example.com"
]

Delete an Alias

Removes one or more aliases from a zone.

Example Request

$ curl -X DELETE https://api.nuevocloud.com/1.0/zones/www.example.com/aliases/subdomain.example.com -u nc_apikey:

Example Response

{
"status": "ok"
}