Get a particular segment for a policy
get
/PASService/rest/services/policies/{policyId}/segments/{segmentId}
Gets a segment associated with a policy based on the specified policy Id and 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 segment associated with a policy based on the specified policy Id and 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/B6780DC5-D0DE-431B-B049-82DBEE3C7D80/segments/A3046709-CF2E-4AFF-A4B9-D65C4769F838"
Example Response Body
The following shows an example of the response body in JSON format:
"{ "segment": { "links": [ { "href": "http://server:port/PASService/rest/services/policies/B6780DC5-D0DE-431B-B049-82DBEE3C7D80/segments/A3046709-CF2E-4AFF-A4B9-D65C4769F838", "rel": "self", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/codes?codeName=Status&codeValue=24", "rel": "codes/status", "mediaType": "application/json", "method": "GET" } ], "multiFields": {}, "codes": [ { "codeName": "AsCodeStatus", "codeValue": "24", "longDescription": "Default Segment", "shortDescription": "Default Segment" } ], "effectiveDate": "2015-08-04T00:00:00Z", "roles": [], "segmentId": "A3046709-CF2E-4AFF-A4B9-D65C4769F838", "parentSegmentId": "18FDD6D7-8FA0-4FBA-9032-9D5AA901E9AA", "policyId": "B6780DC5-D0DE-431B-B049-82DBEE3C7D80", "segmentNameId": "8123E9B1-498C-4A06-A065-5A4D384C2167", "status": "24", "planSegmentNameId": "98FDD6D7-8FA0-4FBA-9032-9D5AA901E9AA", "segmentName": { "multiFields": {}, "codes": [ { "codeName": "AsCodeSegmentType", "codeValue": "04", "longDescription": "Base Coverage", "shortDescription": "Base Coverage" }, { "codeName": "AsCodeStatus", "codeValue": "01", "longDescription": "Active", "shortDescription": "Active" } ], "segmentName": "Base Coverage", "activeFromDate": "2015-08-04T00:00:00Z", "activeToDate": "2020-08-04T00:00:00Z", "planSegmentName": "TestA", "segmentNameId": "8123E9B1-498C-4A06-A065-5A4D384C2167", "planId": "C5EE0DA4-3003-42C1-9468-D91DA546B79F", "productId": "E0CB2711-6967-4DF4-AFE9-324D8F0B6562", "type": "04", "status": "01" } "RadioTest": { "textValue": "00", "optionText": "No" }, "ComboField": { "textValue": "01", "optionText": "Savings" } "SegmentAmount": { "value": 23, "currency": "USD" } } } "