Get list of roles for a specific segment by segment Id

get

/PASService/rest/services/v1/segments/{segmentId}/roles

Gets list of roles associated with a segment based on the specified segment Id.

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

200 Response

This operation fetches a list of roles for a specific segment by segment Id successfully.
Back to Top

Examples

This example describes how to get a list of roles associated with a segment based on the specified segment Id.

Example cURL Command

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

curl \
    -X GET \
    -H "Content-Type: application/json" \
    -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
    -L "http://server:port/PASService/rest/services/v1/segments/A3046709-CF2E-4AFF-A4B9-D65C4769F838/roles"

Note:

The Response body of this request is dynamic and depends on the configuration.

Example Response Body

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

{
    "count": 1,
    "offset": 0,
    "limit": 100,
    "roles": [
        {
            "links": [
                {
                    "href": "http://server:port/PASService/rest/services/v1/roles/B8D6328F-07CD-4A94-BB4C-F82DC04A3420",
                    "rel": "self",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=PercentDollar&codeValue=C",
                    "rel": "codes/percentDollar",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Role&codeValue=72",
                    "rel": "codes/role",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=State&codeValue=CA",
                    "rel": "codes/stateCode",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=RoleStatus&codeValue=01",
                    "rel": "codes/status",
                    "mediaType": "application/json",
                    "method": "GET"
                }
            ],
            "multiFields": {},
            "roleAmount": 12.0,
            "rolePercent": 100.0,
            "stateCode": "CA",
            "roleId": "B8D6328F-07CD-4A94-BB4C-F82DC04A3420",
            "clientId": "37D2EEE3-8624-48C6-981F-2B2891CDB852",
            "externalclientId": "4B29A809-18AD-4D2F-9B0F-821049FCFF63",
            "companyId": "2A93476C-E995-4001-870E-287EE8475921",
            "percentDollar": "C",
            "policyId": "F8CC7B38-95F9-4240-A528-B890AF87188C",
            "role": "72",
            "segmentId": "71A92161-CC46-44F6-85E1-6FACDFE7961D",
            "status": "01"
        }
    ]
}
Back to Top