Accounts-accountId:GET

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
Line 40: Line 40:
 
   "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"}
 +
  ],
 +
  "user": [
 +
    {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/user", "rel": "related"}
 +
  ],
 
   "links": [
 
   "links": [
 
     {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/", "rel": "self"}
 
     {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/", "rel": "self"}
Line 55: Line 73:
  
 
; 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 product of the account.
+
: ''(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 dedicated servers of the account.
+
: ''(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 ==

Revision as of 11:24, 24 October 2013

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"}
  ],
  "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"}
  ],
  "user": [
     {"href": "https://api.hostway.com/accounts/{account-number}/user", "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
(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.

Conditional Hypermedia

Hypermedia fields marked as optional will appear on the basis of the accessing user's permissions.

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


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox