GET api/roles/{roleId}

Gets a specific Role.



Request Information

URI Parameters

NameDescriptionTypeAdditional information
roleId

The id of the Role to get.

globally unique identifier

Required



Body Parameters

None.



Response Information

Resource Description

The requested Role, if it exists; an HTTP exception, otherwise.

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": "6f8e4d4c-a7b3-4a6e-80c6-08fd3438c391",
  "Description": "sample string 2",
  "IsUsed": true,
  "LoweredRoleName": "sample string 4",
  "RoleId": "3383f1dd-da23-43b2-95d1-acc96bcec482",
  "RoleName": "sample string 6",
  "RolePermissions": [
    {
      "Id": 1,
      "RoleId": "f039374e-07d9-4ff9-acf8-f6e70bd458e8",
      "EntityDefinitionId": 1,
      "EntityCategoryId": 1,
      "EntityAttributeId": 1,
      "FileDirectoryId": 1,
      "PermissionId": 3
    },
    {
      "Id": 1,
      "RoleId": "f039374e-07d9-4ff9-acf8-f6e70bd458e8",
      "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>6f8e4d4c-a7b3-4a6e-80c6-08fd3438c391</ApplicationId>
  <Description>sample string 2</Description>
  <IsUsed>true</IsUsed>
  <LoweredRoleName>sample string 4</LoweredRoleName>
  <RoleId>3383f1dd-da23-43b2-95d1-acc96bcec482</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>f039374e-07d9-4ff9-acf8-f6e70bd458e8</RoleId>
    </ReadRolePermissionViewModel>
    <ReadRolePermissionViewModel>
      <EntityAttributeId>1</EntityAttributeId>
      <EntityCategoryId>1</EntityCategoryId>
      <EntityDefinitionId>1</EntityDefinitionId>
      <FileDirectoryId>1</FileDirectoryId>
      <Id>1</Id>
      <PermissionId>3</PermissionId>
      <RoleId>f039374e-07d9-4ff9-acf8-f6e70bd458e8</RoleId>
    </ReadRolePermissionViewModel>
  </RolePermissions>
  <UserCompanyId>1</UserCompanyId>
</ReadRoleViewModel>