Accounts-accountNumber-web-domainName-aliases:GET
From Hostway API Documentation
				
								
				Revision as of 08:45, 23 March 2015 by Viktor.penkov  (Talk)
				
			GET /accounts/{accountNumber}/web/{domainName}/aliases
Returns a list of the domain name aliases.
Contents | 
Request
GET /accounts/{accountNumber}/web/{domainName}/aliases
URI Parameters
- accountNumber - string
 - The user account to which the domain name and the domain name alias belong
 
- domainName - string
 - The target domain name (domain name under which the site is actually hosted)
 
Request Headers
- Authorization - HTTP Authorization header [1]
 - The Authentication credentials of the client application.
 
Response
Response Body
{
    "list": [{"domain": "test.com", "domainAlias": "alias1-test.com"},
             {"domain": "test.com", "domainAlias": "alias2-test.com"}, 
    "links": [{"href": "http://{server_name}/accounts/{accountNumber}/web/{domainName}/aliases",
               "rel": "self"}]
}
 
Parameters
- list - list
 - A list, containing the domain and the corresponding alias values.
 
- links - list
 - Hypermedia for this resource
 
Status Code
- 200 OK
 - Success
 
- 401 Unauthorized
 - The supplied credentials are invalid or do not provide permissions for this operation
 
- 403 Forbidden
 - The authenticated user is not allowed to access this resource
 
- 404 Not Found
 - The domain name or the domain name alias do not exist for the account
 
Examples
Successful retrieving domain name alias
Request
GET /accounts/test-account/web/test.com/aliases
Response
{
    "list": 
    [
             {"domain": "test.com", "domainAlias": "alias1-test.com"},
             {"domain": "test.com", "domainAlias": "alias2-test.com"}
    ], 
    "links": 
    [
              {"href": "http://{server_name}/accounts/{accountNumber}/web/{domainName}/aliases/",
               "rel": "self"}
    ]
}