POST api/PBI_role/userRole
Request Information
URI Parameters
None.
Body Parameters
Collection of PBI_AddUserRoleViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| roles | Collection of PBI_RoleViewModel |
None. |
|
| user_id | globally unique identifier |
Required |
|
| username | string |
None. |
Request Formats
application/json, text/json
Sample:
[
{
"roles": [
{
"active": true,
"code": "sample string 2",
"customer_ID": "42579878-3eba-4174-92ca-a8589d33210f",
"customerName": "sample string 4",
"id": "d0acfae4-e3ff-4dbd-8d35-c34afdc97002",
"names": {
"sample string 1": "sample string 2",
"sample string 3": "sample string 4"
},
"permissions": [
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
},
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
}
],
"site_ID": "94ff253a-a00b-4116-9c51-0358434f1ea0",
"siteName": "sample string 8"
},
{
"active": true,
"code": "sample string 2",
"customer_ID": "42579878-3eba-4174-92ca-a8589d33210f",
"customerName": "sample string 4",
"id": "d0acfae4-e3ff-4dbd-8d35-c34afdc97002",
"names": {
"sample string 1": "sample string 2",
"sample string 3": "sample string 4"
},
"permissions": [
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
},
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
}
],
"site_ID": "94ff253a-a00b-4116-9c51-0358434f1ea0",
"siteName": "sample string 8"
}
],
"user_id": "a85a057a-aa4f-430e-bdff-9ea65fc2eb14",
"username": "sample string 2"
},
{
"roles": [
{
"active": true,
"code": "sample string 2",
"customer_ID": "42579878-3eba-4174-92ca-a8589d33210f",
"customerName": "sample string 4",
"id": "d0acfae4-e3ff-4dbd-8d35-c34afdc97002",
"names": {
"sample string 1": "sample string 2",
"sample string 3": "sample string 4"
},
"permissions": [
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
},
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
}
],
"site_ID": "94ff253a-a00b-4116-9c51-0358434f1ea0",
"siteName": "sample string 8"
},
{
"active": true,
"code": "sample string 2",
"customer_ID": "42579878-3eba-4174-92ca-a8589d33210f",
"customerName": "sample string 4",
"id": "d0acfae4-e3ff-4dbd-8d35-c34afdc97002",
"names": {
"sample string 1": "sample string 2",
"sample string 3": "sample string 4"
},
"permissions": [
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
},
{
"id": "4e958de0-8afd-48e4-80b8-9851d26275e0",
"active": true,
"foreign_ID": "6a4760f4-d4f8-4e61-85be-10cf7529c3aa",
"foreign_Label": "sample string 3",
"type": 1
}
],
"site_ID": "94ff253a-a00b-4116-9c51-0358434f1ea0",
"siteName": "sample string 8"
}
],
"user_id": "a85a057a-aa4f-430e-bdff-9ea65fc2eb14",
"username": "sample string 2"
}
]
application/xml, text/xml
Sample:
<ArrayOfPBI_AddUserRoleViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
<PBI_AddUserRoleViewModel>
<roles>
<PBI_RoleViewModel>
<active>true</active>
<code>sample string 2</code>
<customerName>sample string 4</customerName>
<customer_ID>42579878-3eba-4174-92ca-a8589d33210f</customer_ID>
<id>d0acfae4-e3ff-4dbd-8d35-c34afdc97002</id>
<names xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 1</d5p1:Key>
<d5p1:Value>sample string 2</d5p1:Value>
</d5p1:KeyValueOfstringstring>
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 3</d5p1:Key>
<d5p1:Value>sample string 4</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</names>
<permissions>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
</permissions>
<siteName>sample string 8</siteName>
<site_ID>94ff253a-a00b-4116-9c51-0358434f1ea0</site_ID>
</PBI_RoleViewModel>
<PBI_RoleViewModel>
<active>true</active>
<code>sample string 2</code>
<customerName>sample string 4</customerName>
<customer_ID>42579878-3eba-4174-92ca-a8589d33210f</customer_ID>
<id>d0acfae4-e3ff-4dbd-8d35-c34afdc97002</id>
<names xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 1</d5p1:Key>
<d5p1:Value>sample string 2</d5p1:Value>
</d5p1:KeyValueOfstringstring>
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 3</d5p1:Key>
<d5p1:Value>sample string 4</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</names>
<permissions>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
</permissions>
<siteName>sample string 8</siteName>
<site_ID>94ff253a-a00b-4116-9c51-0358434f1ea0</site_ID>
</PBI_RoleViewModel>
</roles>
<user_id>a85a057a-aa4f-430e-bdff-9ea65fc2eb14</user_id>
<username>sample string 2</username>
</PBI_AddUserRoleViewModel>
<PBI_AddUserRoleViewModel>
<roles>
<PBI_RoleViewModel>
<active>true</active>
<code>sample string 2</code>
<customerName>sample string 4</customerName>
<customer_ID>42579878-3eba-4174-92ca-a8589d33210f</customer_ID>
<id>d0acfae4-e3ff-4dbd-8d35-c34afdc97002</id>
<names xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 1</d5p1:Key>
<d5p1:Value>sample string 2</d5p1:Value>
</d5p1:KeyValueOfstringstring>
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 3</d5p1:Key>
<d5p1:Value>sample string 4</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</names>
<permissions>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
</permissions>
<siteName>sample string 8</siteName>
<site_ID>94ff253a-a00b-4116-9c51-0358434f1ea0</site_ID>
</PBI_RoleViewModel>
<PBI_RoleViewModel>
<active>true</active>
<code>sample string 2</code>
<customerName>sample string 4</customerName>
<customer_ID>42579878-3eba-4174-92ca-a8589d33210f</customer_ID>
<id>d0acfae4-e3ff-4dbd-8d35-c34afdc97002</id>
<names xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 1</d5p1:Key>
<d5p1:Value>sample string 2</d5p1:Value>
</d5p1:KeyValueOfstringstring>
<d5p1:KeyValueOfstringstring>
<d5p1:Key>sample string 3</d5p1:Key>
<d5p1:Value>sample string 4</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</names>
<permissions>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
<PBI_PermissionsViewModel>
<Active>true</Active>
<Foreign_ID>6a4760f4-d4f8-4e61-85be-10cf7529c3aa</Foreign_ID>
<Foreign_Label>sample string 3</Foreign_Label>
<ID>4e958de0-8afd-48e4-80b8-9851d26275e0</ID>
<type>SiteCustomer</type>
</PBI_PermissionsViewModel>
</permissions>
<siteName>sample string 8</siteName>
<site_ID>94ff253a-a00b-4116-9c51-0358434f1ea0</site_ID>
</PBI_RoleViewModel>
</roles>
<user_id>a85a057a-aa4f-430e-bdff-9ea65fc2eb14</user_id>
<username>sample string 2</username>
</PBI_AddUserRoleViewModel>
</ArrayOfPBI_AddUserRoleViewModel>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
integerResponse Formats
application/json, text/json
Sample:
1
application/xml, text/xml
Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>