Get all the roles for a segment
get
/PASService/rest/services/policies/{policyId}/segments/{segmentId}/roles
Gets a list of roles associated to a segment based on the specified segment Id
Request
Path Parameters
-
policyId: string
Pattern:
\{?[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\}?Policy Id -
segmentId: string
Pattern:
\{?[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\}?Segment Id
Response
Supported Media Types
- application/json
Default Response
successful operation
Examples
This example describes how to get a list of roles associated to 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 "Accept: application/json" -u username:password"server:port/PASService/rest/services/policies/989BB237-1C7C-4BE1-A746-F945C236B3F1/segments/DFF67AC3-D712-4ED4-9AF2-C2AA58C3F0F0/roles"
Example Response Body
The following shows an example of the response body in JSON format.
"{
"count": 1,
"roles": [
{
"links": [
{
"href": "http://server:port/PASService/rest/services/roles/DFF67AC3-D712-4ED4-9AF2-C2AA58C3F0F0",
"rel": "self",
"mediaType": "application/json",
"method": "GET"
},
{
"href": "http://server:port/PASService/rest/services/codes?codeName=Role&codeValue=72",
"rel": "codes/role",
"mediaType": "application/json",
"method": "GET"
},
{
"href": "http://server:port/PASService/rest/services/codes?codeName=RoleStatus&codeValue=01",
"rel": "codes/status",
"mediaType": "application/json",
"method": "GET"
}
],
"multiFields": {},
"roleAmount": 23,
"rolePercent": 100,
"stateCode": "CA",
"roleId": "DFF67AC3-D712-4ED4-9AF2-C2AA58C3F0F0",
"clientId": "37D2EEE3-8624-48C6-981F-2B2891CDB852",
"externalclientId": "95ED4FBD-2CFE-4BC1-870E-83FF9500B404",
"companyId": "8097CD63-28CC-4F1A-AAB3-4B35DDB73729",
"percentDollar": 25,
"policyId": "14C082BD-3982-4BE4-A498-4096E690D5B7",
"role": "72",
"segmentId": "5C8FA666-56A1-434E-8E81-A29A599E3E96",
"status": "01"
}
]
}
"