Accounts-accountNumber-web-domainName-subdomains:GET
From Hostway API Documentation
(Difference between revisions)
(→GET /accounts/{accountNumber}/web/{domainName}/subdomains) |
Mike.robski (Talk | contribs) m (1 revision: Release 109) |
Latest revision as of 12:16, 24 July 2015
GET /accounts/{accountNumber}/web/{domainName}/subdomains
Returns a list of the subdomains.
Contents |
Request
GET /accounts/{accountNumber}/web/{domainName}/subdomains
URI Parameters
- accountNumber - string
- The user account to which the domain name and the subdomains 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}", "subdomain": "{subdomain}"}, {"status": "{status}", "domain": "{domain}", "subdomain": "{subdomain}"}, "links": [{"href": "http://{server_name}/accounts/{accountNumber}/web/{domainName}/subdomains", "rel": "self"}] }
Parameters
- list - list
- A list, containing the status, the domain and the corresponding subdomain.
- status - string
- Status of the subdomain. Currently only subdomains with status open are listed.
- domain - string
- The domain name of the main web hosting product.
- subdomains - string
- The subdomain.
- 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 does not exist for the account
Examples
Successful retrieving subdomains
Request
GET /accounts/test-account/web/test.com/subdomains
Response
{ "list": [ {"status": "open", "domain": "test.com", "subdomain": "sub.test.com"}, {"status": "open", "domain": "test.com", "subdomain": "sub1.test.com"}, {"status": "open", "domain": "test.com", "subdomain": "sub1.v.test.com"} ], "links": [ {"href": "https://api.hostway.com/accounts/test-account/web/test.com/subdomains/", "rel": "self"} ] }