POST Roles

Gets a collection of roles and all their associated permissions.

Request Information

URI Parameters

None.

Body Parameters

Collection of string

Request Formats

application/json, text/json

Sample:
[
  "sample string 1",
  "sample string 2"
]

text/html

Sample:
["sample string 1","sample string 2"]

application/xml, text/xml

Sample:
<ArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <string>sample string 1</string>
  <string>sample string 2</string>
</ArrayOfstring>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'HashSet`1'.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

Collection of RoleModel
NameDescriptionTypeAdditional information
Name

string

Required

String length: inclusive between 2 and 255

Description

string

String length: inclusive between 4 and 255

PermissionList

Collection of PermissionModel

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Name": "sample string 1",
    "Description": "sample string 2",
    "PermissionList": [
      {
        "IsCustom": true,
        "Name": "sample string 2",
        "Description": "sample string 3",
        "DisplayName": "sample string 4",
        "AllowIdentification": true
      },
      {
        "IsCustom": true,
        "Name": "sample string 2",
        "Description": "sample string 3",
        "DisplayName": "sample string 4",
        "AllowIdentification": true
      }
    ]
  },
  {
    "Name": "sample string 1",
    "Description": "sample string 2",
    "PermissionList": [
      {
        "IsCustom": true,
        "Name": "sample string 2",
        "Description": "sample string 3",
        "DisplayName": "sample string 4",
        "AllowIdentification": true
      },
      {
        "IsCustom": true,
        "Name": "sample string 2",
        "Description": "sample string 3",
        "DisplayName": "sample string 4",
        "AllowIdentification": true
      }
    ]
  }
]

text/html

Sample:
[{"Name":"sample string 1","Description":"sample string 2","PermissionList":[{"IsCustom":true,"Name":"sample string 2","Description":"sample string 3","DisplayName":"sample string 4","AllowIdentification":true},{"IsCustom":true,"Name":"sample string 2","Description":"sample string 3","DisplayName":"sample string 4","AllowIdentification":true}]},{"Name":"sample string 1","Description":"sample string 2","PermissionList":[{"IsCustom":true,"Name":"sample string 2","Description":"sample string 3","DisplayName":"sample string 4","AllowIdentification":true},{"IsCustom":true,"Name":"sample string 2","Description":"sample string 3","DisplayName":"sample string 4","AllowIdentification":true}]}]

application/xml, text/xml

Sample:
<ArrayOfRoleModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Toluna.TEF.Common.ViewModels.Membership">
  <RoleModel>
    <Description>sample string 2</Description>
    <Name>sample string 1</Name>
    <PermissionList>
      <PermissionModel>
        <AllowIdentification>true</AllowIdentification>
        <Description>sample string 3</Description>
        <DisplayName>sample string 4</DisplayName>
        <Name>sample string 2</Name>
        <IsCustom>true</IsCustom>
      </PermissionModel>
      <PermissionModel>
        <AllowIdentification>true</AllowIdentification>
        <Description>sample string 3</Description>
        <DisplayName>sample string 4</DisplayName>
        <Name>sample string 2</Name>
        <IsCustom>true</IsCustom>
      </PermissionModel>
    </PermissionList>
  </RoleModel>
  <RoleModel>
    <Description>sample string 2</Description>
    <Name>sample string 1</Name>
    <PermissionList>
      <PermissionModel>
        <AllowIdentification>true</AllowIdentification>
        <Description>sample string 3</Description>
        <DisplayName>sample string 4</DisplayName>
        <Name>sample string 2</Name>
        <IsCustom>true</IsCustom>
      </PermissionModel>
      <PermissionModel>
        <AllowIdentification>true</AllowIdentification>
        <Description>sample string 3</Description>
        <DisplayName>sample string 4</DisplayName>
        <Name>sample string 2</Name>
        <IsCustom>true</IsCustom>
      </PermissionModel>
    </PermissionList>
  </RoleModel>
</ArrayOfRoleModel>

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.