Get list of cases

get

/PASService/rest/services/v1/cases

Retrieves list of cases. The response contains an array of all case fields for each case. Additionally, the response will contain links for applications linked to the case. By default, the nested resources are not expanded. If the child or nested resource needs to be expanded in the response, the following URI with "expand" needs to be used. For example: http://server:port/PASService/rest/services/cases?expand=.

Request

Query Parameters
  • 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.
  • 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.
  • 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.
  • 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 all the cases successfully.
Back to Top

Examples

This example describes how to get a list of cases.

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/cases"

Example Response Body

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

{
    "count": 4,
    "offset": 0,
    "limit": 100,
    "cases": [
        {
            "links": [
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14",
                    "rel": "self",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14/policies",
                    "rel": "policies",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=CaseStatus&codeValue=02",
                    "rel": "codes/status",
                    "mediaType": "application/json",
                    "method": "GET"
                }
            ],
            "caseName": "case1",
            "caseNumber": "case1",
            "creationDate": "2021-09-22T00:00:00Z",
            "policies": [
                {
                    "links": [
                        {
                            "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14/policies/08739DA7-D305-450F-975A-44B269B159CD",
                            "rel": "self",
                            "mediaType": "application/json",
                            "method": "GET"
                        }
                    ]
                },
                {
                    "links": [
                        {
                            "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14/policies/C7D84BB8-5812-4A9A-9E77-2DF449310B41",
                            "rel": "self",
                            "mediaType": "application/json",
                            "method": "GET"
                        }
                    ]
                }
            ],
            "caseId": "38F5DD44-438F-40E6-BC59-BB272513DC14",
            "companyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
            "status": "02",
            "updatedDateTime": "2021-09-22T21:38:33Z",
            "CreationDate": null,
            "CaseDetails": null
        },
        {
            "links": [
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14",
                    "rel": "self",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14/policies",
                    "rel": "policies",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=CaseStatus&codeValue=02",
                    "rel": "codes/status",
                    "mediaType": "application/json",
                    "method": "GET"
                }
            ],
            "caseName": "case1",
            "caseNumber": "case1",
            "creationDate": "2021-09-22T00:00:00Z",
            "policies": [
                {
                    "links": [
                        {
                            "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14/policies/08739DA7-D305-450F-975A-44B269B159CD",
                            "rel": "self",
                            "mediaType": "application/json",
                            "method": "GET"
                        }
                    ]
                },
                {
                    "links": [
                        {
                            "href": "http://server:port/PASService/rest/services/v1/cases/38F5DD44-438F-40E6-BC59-BB272513DC14/policies/C7D84BB8-5812-4A9A-9E77-2DF449310B41",
                            "rel": "self",
                            "mediaType": "application/json",
                            "method": "GET"
                        }
                    ]
                }
            ],
            "caseId": "38F5DD44-438F-40E6-BC59-BB272513DC14",
            "companyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
            "status": "02",
            "updatedDateTime": "2021-09-22T21:38:33Z",
            "CreationDate": null,
            "CaseDetails": null
        },
        {
            "links": [
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/3F59F504-52BE-4EFD-8D2F-30BFAE00ADB7",
                    "rel": "self",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/3F59F504-52BE-4EFD-8D2F-30BFAE00ADB7/policies",
                    "rel": "policies",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=CaseStatus&codeValue=02",
                    "rel": "codes/status",
                    "mediaType": "application/json",
                    "method": "GET"
                }
            ],
            "caseName": "test",
            "caseNumber": "CASEA",
            "creationDate": "2019-03-20T00:00:00Z",
            "policies": null,
            "caseId": "3F59F504-52BE-4EFD-8D2F-30BFAE00ADB7",
            "companyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
            "status": "02",
            "updatedDateTime": "2019-03-20T09:36:42Z"
        },
        {
            "links": [
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/5203C2FE-13B1-4A48-8CDA-DE8386C60EF9",
                    "rel": "self",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/cases/5203C2FE-13B1-4A48-8CDA-DE8386C60EF9/policies",
                    "rel": "policies",
                    "mediaType": "application/json",
                    "method": "GET"
                },
                {
                    "href": "http://server:port/PASService/rest/services/v1/codes?codeName=CaseStatus&codeValue=02",
                    "rel": "codes/status",
                    "mediaType": "application/json",
                    "method": "GET"
                }
            ],
            "caseName": "test",
            "caseNumber": "CaseA",
            "creationDate": "2019-03-20T00:00:00Z",
            "policies": null,
            "caseId": "5203C2FE-13B1-4A48-8CDA-DE8386C60EF9",
            "companyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
            "status": "02",
            "updatedDateTime": "2019-03-20T09:36:42Z"
        }
    ]
}
Back to Top