Accounts-accountNumber-web-domainName-aliases-alias:GET
From Hostway API Documentation
				
								
				(Difference between revisions)
				
																
				
				
								
				m (moved Accounts-accountNumber-web-domainName-aliases-AliasDomainName:GET to Accounts-accountNumber-web-domainName-aliases-alias:GET)  | 
		Mike.robski  (Talk | contribs)  m (1 revision: Release 109)  | 
		
Latest revision as of 12:16, 24 July 2015
[edit] GET /accounts/{accountNumber}/web/{domainName}/aliases/{alias}
Returns details of the domain name alias.
Contents | 
[edit] Request
GET /accounts/{accountNumber}/web/{domainName}/aliases/{alias}
[edit] 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)
 
- alias - string
 - The domain name that will act as alias to the target domain
 
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
 - The Authentication credentials of the client application.
 
[edit] Response
[edit] Response Body
{
    "status": "{status}",
    "domain": "{domainName}",
    "alias": "{alias}",
    "links": [
        {
            "href": "http://{server_name}/accounts/{accountNumber}/web/{domainName}/aliases/{alias}", "rel": "self",
            "href": "http://{server_name}/accounts/{accountNumber}/products/{productSpecificationId}", "rel": "product",
            "href": "http://{server_name}/accounts/{accountNumber}/products/{productSpecificationId}/services/{serviceSpecificationId}", "rel": "service"
        }
    ]
}
 
[edit] Parameters
- status - string
 - Current status of the domain name alias. Currently only aliases with status open are listed.
 
- domain - string
 - The domain name of the main web hosting product.
 
- alias - string
 - The alias name.
 
- links - list
 - Hypermedia for this resource. The list includes a link to the web hosting product and a link to the domain alias service.
 
[edit] 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
 
[edit] Examples
[edit] Successful retrieving domain name alias
Request
GET /accounts/test-account/web/test.com/aliases/test-alias.com
Response
{
    "status": "open",
    "domain": "test.com",
    "alias": "test-alias.com",
    "links": [
        {
            "href": "https://api.hostway.com/accounts/acct1234/web/test.com/aliases/test-alias.com", "rel": "self",
            "href": "https://api.hostway.com/accounts/acct1234/products/acct1234-00000149809de3951ac99317007f00000001000/", "rel": "product",
            "href": "https://api.hostway.com/accounts/acct1234/products/acct1234-00000149809de3951ac99317007f00000001000/services/acct1234-0000014c8e39bf39a2fc8945007f00000001000/", "rel": "service"
        }
    ]
}