Case Navigation

Learn how to navigate and retrieve cases using the GET Cases endpoint with cursor-based pagination and type-specific case information.

GET Cases

The GET Cases endpoint provides a comprehensive overview of all cases you have access to, regardless of their type. Every case has a typeproperty specifying the type of case. Furthermore every case has a linksobject with a self property containing a path to an endpoint to fetch case type specific information.

For example, if type is "RFI" the links.self path will be '/api/v1/cases/rfi/case-id'.

The endpoint supports cursor-based pagination.

Cursor-based pagination

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.