Create roles for a policy by policy Id

post

/PASService/rest/services/v1/policies/{policyId}/roles

Creates single or multiple roles based on the specified policy Id.

Request

Path Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: string
Back to Top

Response

201 Response

This response code indicates the creation of roles for a policy by policy Id successfully.
Back to Top

Examples

This example describes how to create a single or multiple roles based on the specified policy Id.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/PASService/rest/services/v1/policies/C9343F06-0EDE-432E-86A3-36FF14E65379/roles" \
     -d '{"Use this placeholder to plug-in the example request body given below"}'

Example Request Body

The following shows an example of the request body in JSON format:

{
  "roles": [
    {
      "multiFields": {
      },
      "roleAmount": 12,
      "rolePercent": 100,
      "stateCode": "CA",
      "roleId": "A7FE1693-CB8D-493F-B6C4-F6C0A937BB39",
      "clientId": "EC97ED8E-090E-4B0B-A7BC-56263EB9A493",
      "externalclientId": "C8D9541F-A592-40F6-9239-CC0046812172",
      "companyId": "05711222-7DB3-4EBD-A821-57A30A699B88",
      "percentDollar": "S",
      "policyId": "F8CC7B38-95F9-4240-A528-B890AF87188C",
      "role": "30",
      "segmentId": "3B8CDB16-FA08-4EB9-8ADC-6EC8150319FA",
      "status": "01"
    }
  ]
}

Example Response Body

The following shows an example of the response body in JSON format:

{
    "roles": [
        "A7FE1693-CB8D-493F-B6C4-F6C0A937BB39"
    ]
}
Back to Top