Accounts-accountId:GET
From Hostway API Documentation
Revision as of 13:01, 19 February 2013 by Mike.robski (Talk | contribs)
GET /accounts/{accountId}
Get details about an account.
Contents |
Request
GET /accounts/{accountId}
Parameters
- accountId - string
- The Id of the account.
URI Parameters
None.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success.
- 403 Forbidden
- Forbidden access to closed and suspended accounts by a user not authorized for such access.
- 404 Not Found
- The account Id was not found.
Response Body
{ "accountNumber": "{accountId}", "status": "open", "products": [ {"href": "https://api.hostway.com/accounts/{account-number}/products", "rel": "related"} ], "exchange": [ {"href": "https://api.hostway.com/accounts/{account-number}/exchange", "rel": "related"} ], "dedicatedServers": [ {"href": "https://api.hostway.com/accounts/{account-number}/dedicatedServers", "rel": "related"} ] "links": [ {"href": "https://api.hostway.com/accounts/{account-number}/", "rel": "self"} ] }
Parameters
- accountNumber - string
- The Id of the account
- status - string
- status of the account. Valid values are open, closed or suspended. Accounts with certain status may not be accessible by regular users.
- products - list
- Hypermedia to a resource containing all the products of the account.
- dedicatedServers - list
- Hypermedia to a resource containing all the dedicated server product of the account.
- exchange - list
- Hypermedia to a resource containing all the dedicated servers of the account.
- links - list
- Hypermedia for this resource. Links to self.
Alternative with partner Id
As an alternative to using the account Id the client can use a partner-specific Id set via the account attribute partner_account_id. The response to this request is the same as the response to a request using the account Id.
GET /partnerAccounts/{partnerAccountId}
Parameters
- partnerAccountId - string
- Partner account Id set via the partner_account_id attribute.
See also