Skip to main content
BluINFO

AddUserRole

Overview 

Adds an existing Role to an existing User. Returns Success/Error code plus primary key of UserRole entry made.

Request Information


Method

POST - api/Person/AddUserRole

URI Parameters

None.

Body Parameters

AddUserRoleViewModel

Name Description Type Additional information
UserId

Required: Represents the PK of an existing User

globally unique identifier

None.

RoleId

Required: Represents the PK of an existing Role

globally unique identifier

None.

RoleScopeTypeId

Required: Represents the type of scope that limits the Role

integer

None.

RoleScopeId

Required: Represents the PK of the entity used to limit the Role based on RoleScopeTypeId

globally unique identifier

None.

JSON

1{
2  "UserId": "8b42aab9-3de7-49be-b218-43c193be5b6e",
3  "RoleId": "39594074-d216-45dc-924a-b6f5a7e98de4",
4  "RoleScopeTypeId": 3,
5  "RoleScopeId": "50a00562-a5ee-40e1-94d2-a99e9e88a507"
6}

XML

2  <RoleId>39594074-d216-45dc-924a-b6f5a7e98de4</RoleId>
3  <RoleScopeId>50a00562-a5ee-40e1-94d2-a99e9e88a507</RoleScopeId>
4  <RoleScopeTypeId>3</RoleScopeTypeId>
5  <UserId>8b42aab9-3de7-49be-b218-43c193be5b6e</UserId>
6</AddUserRoleViewModel>

Response Information 


Resource Description

ResultWithInt

Name Description Type Additional information
ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Value

Represents the PK value that was created as a result of an add

integer

None.

Response Formats 

JSON

1{
2  "ResultCode": 1,
3  "Description": "sample string 2",
4  "Value": 3
5}

XML

2  <Description>sample string 2</Description>
3  <ResultCode>1</ResultCode>
4  <Value>3</Value>
5</ResultWithInt>
  • Was this article helpful?