Accounts-accountId-users-userName-roles:GET

From Hostway API Documentation
Revision as of 12:22, 13 November 2013 by Petre.popescu (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

GET /accounts/{accountId}/users/{userName}/roles

Retrieve the roles of a user

Contents


Request

GET /accounts/{accountId}/users/{userName}/roles

Request Parameters

accountId - string
The Id of the account
userName - string
The username of the user

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's roles 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's roles. The only authenticated users allowed to view these roles are this very user, the account owner(s) of this account, and sales/support agents. 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

{
  "list": [
    "role1",
    "role2"
  ],
  "links": [
    {"href": "https://api.hostway.com/accounts/{accountId}/users/{userName}/roles", "rel": "self"}
  ]
}
 

Parameters

accountId
The ID of the account
userName
The username of this user

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox