Accounts-accountId-users-userName-roles:PUT

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(Request Body)
 
m (1 revision: Release 90)
 

Latest revision as of 13:23, 31 January 2014

[edit] PUT /accounts/{accountId}/users/{userName}/roles

Modify the roles of a user.

Contents


[edit] Request

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

[edit] Request Parameters

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

[edit] URI Parameters

None

[edit] Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

[edit] Request Body

List of new roles to be set to the requested user

[
  "role1",
  "role2"
]
 

[edit] Allowed Roles

Can be retrieved with GET /roles call.

[edit] Response

[edit] Status Code

204 No Content
The user's roles were successfully updated
400 Bad Request
The request body was malformed, or the specified roles are not allowed, or the account owner was attempting to demote himself/herself which is not allowed. (in this case, the response body will contain hints for what went wrong)
401 Unauthorized
Authentication failed
403 Forbidden
Authentication succeeded, but the logged-in user is not allowed to update the roles of this user. The only users allowed to update the roles of this user are this very user, account owner(s) of this account, and sales/support agents. An account owner is any account user with the "sitecontrol_account_owner" role. An account owner may not remove their own "sitecontrol_account_owner" role, though they may do this to other account owners.
404 Not Found
Either the account or user does not exist

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox