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
{
"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
| 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
{
"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>