Accounts-accountNumber-web-domainName-aliases:GET
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 105) |
(→Examples) |
||
Line 23: | Line 23: | ||
<nowiki> | <nowiki> | ||
{ | { | ||
− | "list": [{"domain": " | + | "list": [{"status": "{status}", "domain": "{domain}", "alias": "{alais}"}, |
− | {"domain": " | + | {"status": "{status}", "domain": "{domain}", "alias": "{alais}"}, |
"links": [{"href": "http://{server_name}/accounts/{accountNumber}/web/{domainName}/aliases", | "links": [{"href": "http://{server_name}/accounts/{accountNumber}/web/{domainName}/aliases", | ||
"rel": "self"}] | "rel": "self"}] | ||
Line 32: | Line 32: | ||
==== Parameters ==== | ==== Parameters ==== | ||
:; list - ''list'' | :; list - ''list'' | ||
− | :: A list, containing the domain and the corresponding alias values. | + | :: A list, containing the status, the domain and the corresponding alias values. |
+ | |||
+ | ::; 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'' | :; links - ''list'' | ||
Line 63: | Line 72: | ||
"list": | "list": | ||
[ | [ | ||
− | {"domain": "test.com", " | + | {"status": "open", "domain": "test.com", "alias": "alias1-test.com"}, |
− | {"domain": "test.com", " | + | {"status": "open", "domain": "test.com", "alias": "alias2-test.com"} |
], | ], | ||
"links": | "links": | ||
[ | [ | ||
− | + | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountNumber}/web/{domainName}/aliases/", "rel": "self"} | |
− | + | ||
] | ] | ||
} | } |
Revision as of 08:25, 6 April 2015
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": [{"status": "{status}", "domain": "{domain}", "alias": "{alais}"}, {"status": "{status}", "domain": "{domain}", "alias": "{alais}"}, "links": [{"href": "http://{server_name}/accounts/{accountNumber}/web/{domainName}/aliases", "rel": "self"}] }
Parameters
- list - list
- A list, containing the status, the domain and the corresponding alias values.
- 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
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": [ {"status": "open", "domain": "test.com", "alias": "alias1-test.com"}, {"status": "open", "domain": "test.com", "alias": "alias2-test.com"} ], "links": [ {"href": "https://api.hostway.com/accounts/{accountNumber}/web/{domainName}/aliases/", "rel": "self"} ] }