Pagination

Most endpoints that return a list of items, i.e. .../participants and .../transactions, are paginated. That means only a limited number of items are returned in each request. To fetch all items subsequent requests need to be made. If a response is paginated, the response also contains information on how to fetch the next batch.

Make the first call:

GET .../participants

The response will be a JSON with 2 keys, items and pagination.

Under items you will find the data requested.

The response will also contain pagination metadata under pagination.

{
	"items": [
           // 20 items hidden for better readablity
	],
	"pagination": {
		"hasMore": true,
		"count": 20,
		"limit": 20,
		"lastEvaluatedKey": "eyJpZCI6IjgzOD..."
	}
}

Use lastEvaluatedKey for the next call to fetch the next page.

GET .../participants?lastEvaluatedKey=eyJpZCI6IjgzOD...

This response is the last, hasMore is false and lastEvaluatedKey is absent.

{
	"items": [
           //4 items hidden for better readablity
	],
	"pagination": {
		"hasMore": false,
		"count": 4,
		"limit": 20,
	}
}

As long as hasMore is true and lastEvaluatedKey is present, there are more items to fetch.

lastEvaluatedKey is nullable — it may be absent on the final page even when hasMore is false.

N.B. 1: There is no way to query how many pages that need to be fetched.

N.B. 2: When fetching the last page, if count (number of items returned) is the same as limit (number of items requested) a lastEvaluatedKey is also returned, indicating that there are more items to fetch. However, the next call will return the empty paginated response. This behavior is expected.

{
	"items": [],
	"pagination": {
		"hasMore": false,
		"count": 0,
		"limit": 20,
	}
}

The number of items requested, limit, can be set on any paginated endpoint.

GET /users?limit=50

This way you can control the page size of each call. Default boundaries for limits are 10≤limit≤1000 using 100 if no limit is set. These boundaries can be overridden by any endpoint, please refer to the Swagger docs.

totalCount (integer, nullable) — The total number of items matching the current search or filter across all pages. This field is only present when the request includes search or filter parameters; it is absent on plain unfiltered list requests. Use it to show result counts or build pagination UI (e.g. "142 results, page 1 of 6").

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop