Accounts-accountNumber-web-domainName-aliases:GET
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 105) |
Mike.robski (Talk | contribs) m (1 revision: Release 109) |
||
(One intermediate revision by one user not shown) | |||
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"} | |
− | + | ||
] | ] | ||
} | } |
Latest revision as of 12:16, 24 July 2015
[edit] GET /accounts/{accountNumber}/web/{domainName}/aliases
Returns a list of the domain name aliases.
Contents |
[edit] Request
GET /accounts/{accountNumber}/web/{domainName}/aliases
[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)
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
[edit] Response
[edit] 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"}] }
[edit] 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
[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
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"} ] }