PUT api/Role

Updates a Role.



Request Information

URI Parameters

None.



Body Parameters

The UpdateRoleViewModel representing the Role to update.

UpdateRoleViewModel
NameDescriptionTypeAdditional information
RoleId

globally unique identifier

None.

RoleName

string

None.

RolePermissions

Collection of SaveRolePermissionViewModel

None.

Request Formats

application/json, text/json

Sample:
{
  "RoleId": "d8217f90-2bee-4c38-91ff-90d5d9215325",
  "RoleName": "sample string 2",
  "RolePermissions": [
    {
      "EntityDefinitionId": 1,
      "EntityCategoryId": 1,
      "EntityAttributeId": 1,
      "FileDirectoryId": 1,
      "PermissionId": 1
    },
    {
      "EntityDefinitionId": 1,
      "EntityCategoryId": 1,
      "EntityAttributeId": 1,
      "FileDirectoryId": 1,
      "PermissionId": 1
    }
  ]
}

application/xml, text/xml

Sample:
<UpdateRoleViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VobeSoft.Models.ViewModels">
  <RoleId>d8217f90-2bee-4c38-91ff-90d5d9215325</RoleId>
  <RoleName>sample string 2</RoleName>
  <RolePermissions>
    <SaveRolePermissionViewModel>
      <EntityAttributeId>1</EntityAttributeId>
      <EntityCategoryId>1</EntityCategoryId>
      <EntityDefinitionId>1</EntityDefinitionId>
      <FileDirectoryId>1</FileDirectoryId>
      <PermissionId>1</PermissionId>
    </SaveRolePermissionViewModel>
    <SaveRolePermissionViewModel>
      <EntityAttributeId>1</EntityAttributeId>
      <EntityCategoryId>1</EntityCategoryId>
      <EntityDefinitionId>1</EntityDefinitionId>
      <FileDirectoryId>1</FileDirectoryId>
      <PermissionId>1</PermissionId>
    </SaveRolePermissionViewModel>
  </RolePermissions>
</UpdateRoleViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.



Response Information

Resource Description

ReadRoleViewModel

NameDescriptionTypeAdditional information
ApplicationId

globally unique identifier

None.

Description

string

None.

IsUsed

boolean

None.

LoweredRoleName

string

None.

RoleId

globally unique identifier

None.

RoleName

string

None.

RolePermissions

Collection of ReadRolePermissionViewModel

None.

UserCompanyId

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "ApplicationId": "d0fed8ed-8e87-4572-a317-111cfa97e2e2",
  "Description": "sample string 2",
  "IsUsed": true,
  "LoweredRoleName": "sample string 4",
  "RoleId": "c172ce4e-3ce9-4c74-87e9-df42394d66e7",
  "RoleName": "sample string 6",
  "RolePermissions": [
    {
      "Id": 1,
      "RoleId": "e60f8357-60d3-45c8-b4f7-0fc3031f79a5",
      "EntityDefinitionId": 1,
      "EntityCategoryId": 1,
      "EntityAttributeId": 1,
      "FileDirectoryId": 1,
      "PermissionId": 3
    },
    {
      "Id": 1,
      "RoleId": "e60f8357-60d3-45c8-b4f7-0fc3031f79a5",
      "EntityDefinitionId": 1,
      "EntityCategoryId": 1,
      "EntityAttributeId": 1,
      "FileDirectoryId": 1,
      "PermissionId": 3
    }
  ],
  "UserCompanyId": 1
}

application/xml, text/xml

Sample:
<ReadRoleViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VobeSoft.Models.ViewModels">
  <ApplicationId>d0fed8ed-8e87-4572-a317-111cfa97e2e2</ApplicationId>
  <Description>sample string 2</Description>
  <IsUsed>true</IsUsed>
  <LoweredRoleName>sample string 4</LoweredRoleName>
  <RoleId>c172ce4e-3ce9-4c74-87e9-df42394d66e7</RoleId>
  <RoleName>sample string 6</RoleName>
  <RolePermissions>
    <ReadRolePermissionViewModel>
      <EntityAttributeId>1</EntityAttributeId>
      <EntityCategoryId>1</EntityCategoryId>
      <EntityDefinitionId>1</EntityDefinitionId>
      <FileDirectoryId>1</FileDirectoryId>
      <Id>1</Id>
      <PermissionId>3</PermissionId>
      <RoleId>e60f8357-60d3-45c8-b4f7-0fc3031f79a5</RoleId>
    </ReadRolePermissionViewModel>
    <ReadRolePermissionViewModel>
      <EntityAttributeId>1</EntityAttributeId>
      <EntityCategoryId>1</EntityCategoryId>
      <EntityDefinitionId>1</EntityDefinitionId>
      <FileDirectoryId>1</FileDirectoryId>
      <Id>1</Id>
      <PermissionId>3</PermissionId>
      <RoleId>e60f8357-60d3-45c8-b4f7-0fc3031f79a5</RoleId>
    </ReadRolePermissionViewModel>
  </RolePermissions>
  <UserCompanyId>1</UserCompanyId>
</ReadRoleViewModel>