Get Cases

This endpoint is used for retrieving a paginated list of Cases.
You start by sending an initial request with the desired parameters set (Type, Status, Limit, Order).
The response will include metadata such as number of records returned and if there are more records in the direction requested.
The response will include a 'Links' object with 'Next' and 'Previous' links that must be used to get the next or previous page.
If response states there are no more records after using a 'Next-link' you are at the end for now.
The response will still contain a 'Next-link' that may result in more records in the future, depending on sort order.

An endpoint that supports cursor-based pagination always support the following parameters:

ParameterDescriptionPossible ValuesDefaultRemark
LimitMax number of records to be returned on each request.1 - 1000100 (if Cursor not set)Only allowed on initial request (when not using Cursor).
OrderIn what order the records will be returned. The columns that are ordered by may vary between endpoints.'ASC', 'DESC''DESC' (if Cursor not set)Only allowed on initial request (when not using Cursor).
CursorA cursor used to fetch the next/previous set of records.Next or Previous cursor from an earlier requestNULLWhen using a cursor, you can't change the parameters from the initial request. If that is needed, you have to create a new initial request.
DirectionWhether you want to fetch records after the cursor (next) or before the cursor (prev).'NEXT', 'PREV'NULLOnly allowed when using Cursor.

A specific endpoint that supports cursor-based pagination may support additional query parameters.

❗️

It is not possible to adjust query parameters when using a cursor. If the limit is set to 5, all succeeding cursor-based requests will use the same limit etc. The only allowed parameter to use with Cursor is Direction.

The response of an endpoint that supports cursor-based pagination will have the form:

{
  "result": [
    {
      //...
    },
    {
      //...
    }
  ],
  "pageInfo": {
    "recordCount": 2,
    "hasMore": true,
    "nextCursor": "some-cursor-to-get-next",
    "previousCursor": "some-cursor-to-get-previous"
  },
  "links": {
    "self": null,
    "next": "/api/v1/cases?cursor=some-cursor-to-get-next&direction=next",
    "previous": "/api/v1/cases?cursor=some-cursor-to-get-previous&direction=prev"
  }
}

Property

Description

Usage

Result

The actual records requested

PageInfo.RecordCount

The number of records in the Result list

PageInfo.HasMore

Indicates if there are currently more records to be fetched on the next/previous page. The value is based on the direction of the former request.

If hasMore is false you have reached the current end of the list. Depending on sort order and direction of traversal, there may come more records eventually.
Practically it means that when hasMore becomes false, the 'next' link can be saved and this can be used to check if new records has appeared instead of starting all over.

PageInfo.NextCursor

Cursor to be used to fetch next records.

Use this with Direction 'NEXT' to get next records - or use the Links.Next instead.

PageInfo.PreviousCursor

Cursor to be used to fetch previous records.

Use this with Direction 'PREV' to get previous records - or use the Links.Prev instead.

Links.Next

Path to use to get the next records. This will be NULL if Result is empty - in that case the former request would have indicated that by setting hasMore to false.

The Cursor and Direction parameter is added in this path already, so this can be used straight away to get the next records.

Links.Prev

Path to use to get the previous records. This will be NULL if Result is empty - in that case the former request would have indicated that by setting hasMore to false.

The Cursor and Direction parameter is added in this path already, so this can be used straight away to get the previous records.




Language
Credentials
Bearer