Previous Next JavaScript must be enabled to correctly display this content

## Get list of impairments for a specific policy by policy Id

get

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

Gets all impairments associated with a policy based on the specified policy Id. This request will be in the context of a unique policy only. Where the impairments are also attached to client in a policy, client full name is also available in response. The response also will contain count of records.

### Request

Path Parameters

- policyId(required): string(guid)
  Policy Id

Query Parameters

- expand: string
  When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "the name of the child resource". More than one child can be specified using comma as a separator. Example:?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers). More than one child can be specified using comma as a separator. For example: "?expand=Employees,Localizations". Nested children can also be provided following the format: "Child.NestedChild" For example:"?expand=Employees.Managers" If a nested child is provided (Example:Employees.Managers), the missing children will be processed implicitly i.e.,"?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers", which will expand both Employees and Managers.
- limit: integer(int32)
  This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
- offset: integer(int32)
  Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
- q: string
  This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;loc!="NY.

There's no request body for this operation.

Back to Top

### Response

#### 200 Response

This operation fetches list of impairments for a specific policy by policy Id successfully.
Back to Top

### Examples

This example describes how to get a impairment associated with a policy based on the specified policy Id and impairment 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/policies/B2BCCABA-3880-42A8-8C0D-357473ED8F6B/impairments/4B324537-3411-4926-93AC-24BB8A74E1CF"

Example Response Body

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

    {
      "count": 5,
      "impairments": [
        {
          "links": [
            {
              "href": "http://server:port/PASService/rest/services/policies/B2BCCABA-3880-42A8-8C0D-357473ED8F6B/impairments/4B324537-3411-4926-93AC-24BB8A74E1CF",
              "rel": "self",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentCategory&codeValue=04",
              "rel": "codes/category",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentStatus&codeValue=12",
              "rel": "codes/status",
              "mediaType": "application/json",
              "method": "GET"
            }
          ],
          "multiFields": {},
          "codes": {},
          "debit": 12,
          "flatExtra": 2,
          "duration": 1,
          "comments": "Test",
          "createdBy": "qatester3",
          "lastModifiedBy": "qatester3",
          "impairmentId": "4B324537-3411-4926-93AC-24BB8A74E1CF",
          "category": "04",
          "createdDate": "2018-08-13T10:10:41Z",
          "lastmodifiedDate": "2018-08-16T09:54:46Z",
          "status": "12",
          "policyId": "B2BCCABA-3880-42A8-8C0D-357473ED8F6B"
        },
        {
          "links": [
            {
              "href": "http://server:port/PASService/rest/services/policies/B2BCCABA-3880-42A8-8C0D-357473ED8F6B/impairments/4B324537-3411-4926-93AC-24BB8A74E1NU",
              "rel": "self",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentCategory&codeValue=04",
              "rel": "codes/category",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentStatus&codeValue=01",
              "rel": "codes/status",
              "mediaType": "application/json",
              "method": "GET"
            }
          ],
          "multiFields": {},
          "codes": {},
          "debit": 11,
          "flatExtra": 4,
          "duration": 1,
          "comments": "Impairment added from AsFile",
          "createdBy": "asfile",
          "lastModifiedBy": "asfile",
          "impairmentId": "4B324537-3411-4926-93AC-24BB8A74E1NU",
          "category": "04",
          "priority": "01",
          "createdDate": "2013-02-07T11:25:30Z",
          "lastmodifiedDate": "2013-02-07T11:25:30Z",
          "status": "01",
          "policyId": "B2BCCABA-3880-42A8-8C0D-357473ED8F6B"
        },
        {
          "links": [
            {
              "href": "http://server:port/PASService/rest/services/policies/B2BCCABA-3880-42A8-8C0D-357473ED8F6B/impairments/4B324537-3411-4926-93AC-24BB8A74W1CC",
              "rel": "self",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentCategory&codeValue=04",
              "rel": "codes/category",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentStatus&codeValue=01",
              "rel": "codes/status",
              "mediaType": "application/json",
              "method": "GET"
            }
          ],
          "multiFields": {},
          "codes": {},
          "debit": 11,
          "flatExtra": 4,
          "duration": 1,
          "comments": "Impairment added from AsFile",
          "createdBy": "Interface",
          "lastModifiedBy": "Interface",
          "impairmentId": "4B324537-3411-4926-93AC-24BB8A74W1CC",
          "category": "04",
          "priority": "01",
          "createdDate": "2018-08-08T12:25:30Z",
          "lastmodifiedDate": "2018-08-08T12:25:30Z",
          "status": "01",
          "policyId": "B2BCCABA-3880-42A8-8C0D-357473ED8F6B",
          "clientId": "756846C8-6F55-4E5F-9679-7725879DD2EC",
          "fullName": "client113001"
        },
        {
          "links": [
            {
              "href": "http://server:port/PASService/rest/services/policies/B2BCCABA-3880-42A8-8C0D-357473ED8F6B/impairments/4B324537-3411-4926-93AC-24BB8A74W1NU",
              "rel": "self",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentCategory&codeValue=04",
              "rel": "codes/category",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentStatus&codeValue=01",
              "rel": "codes/status",
              "mediaType": "application/json",
              "method": "GET"
            }
          ],
          "multiFields": {},
          "codes": {},
          "debit": 11,
          "flatExtra": 4,
          "duration": 1,
          "comments": "Impairment added from AsFile",
          "createdBy": "asfile",
          "lastModifiedBy": "asfile",
          "impairmentId": "4B324537-3411-4926-93AC-24BB8A74W1NU",
          "category": "04",
          "priority": "01",
          "createdDate": "2018-08-08T12:25:30Z",
          "lastmodifiedDate": "2018-08-08T12:25:30Z",
          "status": "01",
          "policyId": "B2BCCABA-3880-42A8-8C0D-357473ED8F6B"
        },
        {
          "links": [
            {
              "href": "http://server:port/PASService/rest/services/policies/B2BCCABA-3880-42A8-8C0D-357473ED8F6B/impairments/AEF79DA3-2D6B-446E-8383-41F84F7C67E4",
              "rel": "self",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentCategory&codeValue=04",
              "rel": "codes/category",
              "mediaType": "application/json",
              "method": "GET"
            },
            {
              "href": "http://server:port/PASService/rest/services/codes?codeName=ImpairmentStatus&codeValue=12",
              "rel": "codes/status",
              "mediaType": "application/json",
              "method": "GET"
            }
          ],
          "multiFields": {},
          "codes": {},
          "debit": 123,
          "flatExtra": 2,
          "duration": 1,
          "comments": "Manual Entry",
          "createdBy": "qatester3",
          "lastModifiedBy": "qatester3",
          "impairmentId": "AEF79DA3-2D6B-446E-8383-41F84F7C67E4",
          "category": "04",
          "createdDate": "2018-08-14T08:48:17Z",
          "lastmodifiedDate": "2018-08-16T09:54:37Z",
          "status": "12",
          "policyId": "B2BCCABA-3880-42A8-8C0D-357473ED8F6B",
          "clientId": "756846C8-6F55-4E5F-9679-7725879DD2EC",
          "fullName": "client113001"
        }
      ]
    }

Back to Top