Accounts-accountId-users:GET
From Hostway API Documentation
				
								
				Revision as of 12:23, 31 January 2014 by Mike.robski  (Talk | contribs)
				
			GET /accounts/{accountId}/users
Returns a list of users in an account
Contents | 
Request
GET /accounts/{accountId}/users
Request 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
 - 304 Not changed
 - The list of users hasn't changed since the last request; the client should use its locally cached copy instead.
 - 401 Unauthorized
 - The authorization header contained an invalid value
 - 403 Forbidden
 - Successfully authenticated, but client is not allowed to view the list of users. Access is only permitted for agents and account owners of this account. An account owner is a user with the "sitecontrol_account_owner" role.
 - 404 Not Found
 - The account in question does not exist
 
Response Body
{
  "list": [
    {
      "userName": "{userName}",
      "details": "https://api.hostway.com/accounts/{accountId}/users/{userName}"
    },
    ...
  ],
  "links": [
    {"href": "https://api.hostway.com/accounts/{accountId}/users", "rel": "self"}
  ]
}
 
Parameters
- accountNumber
 - the Id of the account
 - userName
 - the username of the user
 
See Also