Pagination

Introduction

When retrieving large datasets from the Passport API, pagination ensures optimized performance and efficient data handling. This guide explains how the pagination_info object is structured and how to implement pagination in API requests.

Pagination Overview

Pagination helps manage large sets of results by breaking them into smaller, more manageable pages. The pagination_info object provides metadata about the paginated response.

Example of Pagination Response

JSON
Copy

Pagination Objects Fields

FieldTypeDescription
total_elementsIntegerThe total number of items available across all pages.
first_request_timestampsString (ISO 8601)The timestamp when the initial request was made.
total_pagesIntegerThe total number of pages available.
current_pageIntegerThe page number of the current response.

The API automatically calculates the total number of pages based on the number of elements and the page size.

Requesting Paginated Data

To request paginated data, include supported pagination parameter in the request:

Example Request

JSON
Copy

All endpoints (GET) will always return a pagination object.

Example of Response

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard