Bloom CPMSGuideReference

Pagination

Pagination via Headers

Some API methods return paginated results to handle large datasets efficiently. Pagination is controlled through HTTP headers, allowing clients to specify how many items to retrieve per request and to continue fetching data across multiple calls.

Initial Request

In the first request, you must include a pagination header called x-max-item-count, which defines the maximum number of items to return in the response.

  • Header: x-max-item-count

  • Type: integer

  • Format: int32
    This is a signed 32-bit integer, commonly used for specifying numeric limits.

Example:

x-max-item-count: 100

Response Headers

The response will include a continuation token in the header named x-continuation. This token is used to fetch the next page of results.

  • Header: x-continuation

  • Type: string
    This token represents the position in the dataset where the next request should continue.

Example:

x-continuation: eyJpZCI6IjEyMzQ1NiIsInRpbWVzdGFtcCI6IjIwMjUtMTAtMDFUMDk6MDA6MDBaIn0=

Subsequent Requests

To retrieve the next set of results, include both the original x-max-item-count and the x-continuation token in the headers of your next request.

Example:

x-max-item-count: 100
x-continuation: <value from previous response>

Repeat this process until no continuation token is returned, indicating that all data has been retrieved.