Get a specific segment for a specific policy by policy Id and segment Id

get

/PASService/rest/services/v1/policies/{policyId}/segments/{segmentId}

Gets a segment associated with a policy based on the specified policy Id and segment Id

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

This operation fetches a specific segment for a specific policy Id and segment Id successfully.
Back to Top

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 "Content-Type: application/json" \
    -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ 
    -L "http://server:port/PASService/rest/services/v1/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/v1/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/v1/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"
        }
    }
}

Back to Top