POST api/Roles/SaveEntityRoles?entityCode={entityCode}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
entityCode

string

Required

Body Parameters

roleList
NameDescriptionTypeAdditional information
roles

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "roles": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<RolesController.roleList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/POLiConsoleAPI.External.Controllers">
  <roles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </roles>
</RolesController.roleList>

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 'roleList'.

Response Information

Resource Description

ServiceValidationResult
NameDescriptionTypeAdditional information
Success

boolean

None.

ChangesFound

boolean

None.

Pending

boolean

None.

Errors

Collection of ItemValidation

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "ChangesFound": true,
  "Pending": true,
  "Errors": [
    {
      "FieldName": "sample string 1",
      "Message": "sample string 2"
    },
    {
      "FieldName": "sample string 1",
      "Message": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<ServiceValidationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ConsoleAPI.Internal.Models.Entities">
  <ChangesFound>true</ChangesFound>
  <Errors>
    <ItemValidation>
      <FieldName>sample string 1</FieldName>
      <Message>sample string 2</Message>
    </ItemValidation>
    <ItemValidation>
      <FieldName>sample string 1</FieldName>
      <Message>sample string 2</Message>
    </ItemValidation>
  </Errors>
  <Pending>true</Pending>
  <Success>true</Success>
</ServiceValidationResult>