Accounts-accountId-users-userName:GET
From Hostway API Documentation
(Difference between revisions)
(→Status Code) |
Mike.robski (Talk | contribs) m (1 revision: Release 90) |
Latest revision as of 12:23, 31 January 2014
GET /accounts/{accountId}/users/{userName}
Return the details of one specific user
Contents |
Request
GET /accounts/{accountId}/users/{userName}
Request Parameters
- accountId - string
- The Id of the account
- userName - string
- The username of the user to retrieve
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 user details haven't changed since the last request; the client should use its locally cached copy
- 401 Unauthorized
- Authentication failed
- 403 Forbidden
- Authentication succeeded, but the authenticated user is not allowed to view this user resource. The only authenticated users allowed to view this user resource are this very user, the account owner(s) of this account, and sales/support agents, the user which authorization credentials match the requested user's credentials. An account owner is a user within the account that has the role "sitecontrol_account_owner".
- 404 Not found
- Either the account or the requested user does not exist.
Response Body
{ "userName": "{userName}", "securityQuestion": "{securityQuestionCode}", "roles": "https://api.hostway.com/accounts/{accountId}/users/{userName}/roles", "links": [ {"href": "https://api.hostway.com/accounts/{accountId}/users/{userName}", "rel": "self"} ] }
Parameters
- accountId
- The ID of the account
- userName
- The username of this user
- securityQuestionCode
- The security question code of this user (this will be used to refer to a list of security questions)
See also