PUT v1/core/Accounts/{accId}/users/{usrId}/role

Set the delegated admin role for this user This will overwrite any previously set role. The Role Id needs to be feeched first from the /users/roles endpoint

Request Information

Parameters

NameDescriptionAdditional information
accId
the account to look for the user in

Define this parameter in the request URI.

usrId
the user id to retrieve

Define this parameter in the request URI.

item
the role to assign

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "RoleID": 1,
  "UserID": 2
}

text/javascript

Sample:
{"RoleID":1,"UserID":2}

application/xml, text/xml

Sample:
<AssignedRole xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/pbnb_models">
  <RoleID>1</RoleID>
  <UserID>2</UserID>
</AssignedRole>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AssignedRole'.

application/bson

Sample:
RoleIDUserID

Response Information

Response body formats

application/json, text/json

Sample:
{
  "Success": true,
  "Data": {
    "RoleID": 1,
    "UserID": 2
  },
  "ErrorCode": 2,
  "ErrorDescription": "sample string 3",
  "Meta": "sample string 4"
}

text/javascript

Sample:
{"Success":true,"Data":{"RoleID":1,"UserID":2},"ErrorCode":2,"ErrorDescription":"sample string 3","Meta":"sample string 4"}

application/xml, text/xml

Sample:
<PBNBReturnOfAssignedRoleCA1DLPoZ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/pbnb_models">
  <Data>
    <RoleID>1</RoleID>
    <UserID>2</UserID>
  </Data>
  <ErrorCode>2</ErrorCode>
  <ErrorDescription>sample string 3</ErrorDescription>
  <Meta>sample string 4</Meta>
  <Success>true</Success>
</PBNBReturnOfAssignedRoleCA1DLPoZ>

application/bson

Sample:
�SuccessDataRoleIDUserIDErrorCodeErrorDescriptionsample string 3Metasample string 4