Accounts-accountId:GET
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision) |
Mike.robski (Talk | contribs) m (1 revision: Release 101) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 31: | Line 31: | ||
{ | { | ||
"accountNumber": "{accountId}", | "accountNumber": "{accountId}", | ||
+ | "createdDate": "{createdDate}", | ||
+ | "currency": "{currency}", | ||
"status": "open", | "status": "open", | ||
+ | "paymentInfo": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/paymentInfo", "rel": "related"} | ||
+ | ], | ||
"products": [ | "products": [ | ||
{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/products", "rel": "related"} | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/products", "rel": "related"} | ||
Line 40: | Line 45: | ||
"dedicatedServers": [ | "dedicatedServers": [ | ||
{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/dedicatedServers", "rel": "related"} | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/dedicatedServers", "rel": "related"} | ||
− | ] | + | ], |
+ | "contacts": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/contacts", "rel": "related"} | ||
+ | ], | ||
+ | "email": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/email", "rel": "related"} | ||
+ | ], | ||
+ | "domains": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/domains", "rel": "related"} | ||
+ | ], | ||
+ | "attributes": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/attributes", "rel": "related"} | ||
+ | ], | ||
+ | "flexcloud": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/flexcloud", "rel": "related"} | ||
+ | ], | ||
+ | "users": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/users", "rel": "related"} | ||
+ | ], | ||
"links": [ | "links": [ | ||
{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/", "rel": "self"} | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/", "rel": "self"} | ||
Line 50: | Line 73: | ||
; accountNumber - ''string'' | ; accountNumber - ''string'' | ||
: The Id of the account | : The Id of the account | ||
+ | |||
+ | ; createdDate - ''date'' | ||
+ | : The date account was created in format Y-m-d | ||
+ | |||
+ | ; currency - ''string'' | ||
+ | : An ISO-4217[http://www.iso.org/iso/home/standards/currency_codes.htm] currency code assigned to the account. | ||
; status - ''string'' | ; status - ''string'' | ||
: status of the account. Valid values are '''open''', '''closed''' or '''suspended'''. Accounts with certain status may not be accessible by regular users. | : status of the account. Valid values are '''open''', '''closed''' or '''suspended'''. Accounts with certain status may not be accessible by regular users. | ||
+ | |||
+ | ; paymentInfo - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to a resource of the payment instruments associated with the account. | ||
+ | |||
+ | ; users - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to a resource of the users associated with the account. | ||
; products - ''list'' | ; products - ''list'' | ||
− | : [[Hypermedia]] to a resource containing all the products of the account. | + | : ''(OPTIONAL)'' |
+ | : [[Hypermedia]] to a resource containing all the products of the account. This value will appear depending on the user's access rights. | ||
; dedicatedServers - ''list'' | ; dedicatedServers - ''list'' | ||
− | : [[Hypermedia]] to a resource containing all the dedicated server | + | : ''(OPTIONAL)'' |
+ | : [[Hypermedia]] to a resource containing all the dedicated server products of the account. | ||
; exchange - ''list'' | ; exchange - ''list'' | ||
− | : [[Hypermedia]] to a resource containing all the | + | : ''(OPTIONAL)'' |
+ | : [[Hypermedia]] to a resource containing all the Exchange domains of the account. | ||
+ | |||
+ | ; contacts - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to a resource handling the contact details of the account. | ||
+ | |||
+ | ; email - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to a resource containing all the email domains of the account. | ||
+ | |||
+ | ; domains - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] linking to the domain name management of the account. | ||
+ | |||
+ | ; attributes - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to a partner attributes of the account. | ||
+ | |||
+ | ; flexcloud - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to the Flexcloud management of the account. | ||
; links - ''list'' | ; links - ''list'' | ||
: [[Hypermedia]] for this resource. Links to self. | : [[Hypermedia]] for this resource. Links to self. | ||
+ | |||
+ | == Conditional Hypermedia == | ||
+ | Hypermedia fields marked as optional will appear on the basis of the accessing user's permissions. | ||
== Alternative with partner Id == | == Alternative with partner Id == |
Latest revision as of 22:49, 16 December 2014
[edit] GET /accounts/{accountId}
Get details about an account.
Contents |
[edit] Request
GET /accounts/{accountId}
[edit] Parameters
- accountId - string
- The Id of the account.
[edit] URI Parameters
None.
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
[edit] Response
[edit] 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.
[edit] Response Body
{ "accountNumber": "{accountId}", "createdDate": "{createdDate}", "currency": "{currency}", "status": "open", "paymentInfo": [ {"href": "https://api.hostway.com/accounts/{account-number}/paymentInfo", "rel": "related"} ], "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"} ], "contacts": [ {"href": "https://api.hostway.com/accounts/{account-number}/contacts", "rel": "related"} ], "email": [ {"href": "https://api.hostway.com/accounts/{account-number}/email", "rel": "related"} ], "domains": [ {"href": "https://api.hostway.com/accounts/{account-number}/domains", "rel": "related"} ], "attributes": [ {"href": "https://api.hostway.com/accounts/{account-number}/attributes", "rel": "related"} ], "flexcloud": [ {"href": "https://api.hostway.com/accounts/{account-number}/flexcloud", "rel": "related"} ], "users": [ {"href": "https://api.hostway.com/accounts/{account-number}/users", "rel": "related"} ], "links": [ {"href": "https://api.hostway.com/accounts/{account-number}/", "rel": "self"} ] }
[edit] Parameters
- accountNumber - string
- The Id of the account
- createdDate - date
- The date account was created in format Y-m-d
- currency - string
- An ISO-4217[2] currency code assigned to 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.
- paymentInfo - list
- (OPTIONAL)
- Hypermedia to a resource of the payment instruments associated with the account.
- users - list
- (OPTIONAL)
- Hypermedia to a resource of the users associated with the account.
- products - list
- (OPTIONAL)
- Hypermedia to a resource containing all the products of the account. This value will appear depending on the user's access rights.
- dedicatedServers - list
- (OPTIONAL)
- Hypermedia to a resource containing all the dedicated server products of the account.
- exchange - list
- (OPTIONAL)
- Hypermedia to a resource containing all the Exchange domains of the account.
- contacts - list
- (OPTIONAL)
- Hypermedia to a resource handling the contact details of the account.
- email - list
- (OPTIONAL)
- Hypermedia to a resource containing all the email domains of the account.
- domains - list
- (OPTIONAL)
- Hypermedia linking to the domain name management of the account.
- attributes - list
- (OPTIONAL)
- Hypermedia to a partner attributes of the account.
- flexcloud - list
- (OPTIONAL)
- Hypermedia to the Flexcloud management of the account.
- links - list
- Hypermedia for this resource. Links to self.
[edit] Conditional Hypermedia
Hypermedia fields marked as optional will appear on the basis of the accessing user's permissions.
[edit] 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}
[edit] Parameters
- partnerAccountId - string
- Partner account Id set via the partner_account_id attribute.
[edit] See also