Skip to main content

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

NameDescriptionTypeAdditional information
UserIdRequired: Represents the PK of an existing Userglobally unique identifierNone.
RoleIdRequired: Represents the PK of an existing Roleglobally unique identifierNone.
RoleScopeTypeIdRequired: Represents the type of scope that limits the RoleintegerNone.
RoleScopeIdRequired: Represents the PK of the entity used to limit the Role based on RoleScopeTypeIdglobally unique identifierNone.

JSON

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

XML

<AddUserRoleViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers">
<RoleId>39594074-d216-45dc-924a-b6f5a7e98de4</RoleId>
<RoleScopeId>50a00562-a5ee-40e1-94d2-a99e9e88a507</RoleScopeId>
<RoleScopeTypeId>3</RoleScopeTypeId>
<UserId>8b42aab9-3de7-49be-b218-43c193be5b6e</UserId>
</AddUserRoleViewModel>

Response Information


Resource Description

ResultWithInt

NameDescriptionTypeAdditional information
ResultCodeRepresents the result codeintegerNone.
DescriptionRepresents a description of the result codestringNone.
ValueRepresents the PK value that was created as a result of an addintegerNone.

Response Formats

JSON

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

XML

<ResultWithInt xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers">
`````<Description>``````sample string 2</Description>
`<ResultCode>`1</ResultCode>
`<Value>`3</Value>
</ResultWithInt>