Skip to main content

Pagination

OpenMetadata uses both cursor-based and offset-based pagination, depending on the endpoint. Most top-level entity list endpoints use cursor-based pagination for stable traversal, while many sub-resource and specialized endpoints use limit plus offset.

Pagination Parameters

Response Fields

The paging object varies by endpoint. Cursor-paginated responses usually include: Offset-paginated endpoints also return total, and may include offset, limit, or cursor-style before/after fields depending on the resource. Check the endpoint schema for the exact response shape.

Include Per-Entity Permissions

Top-level entity list endpoints accept the opt-in includePermissions query parameter. Its default is false, so existing responses are unchanged. When includePermissions=true, the response adds entityPermissions, an object keyed by the universally unique identifier (UUID) of each entity. Each value is the same ResourcePermission returned for that entity by the permissions API.
Permissions are computed only for entities in the returned page. Use this option when rendering row actions to avoid one permission request per row. Omit it when permissions aren’t needed.

Examples

Basic Pagination

Basic Pagination

Offset-Based Pagination

Use offset on endpoints that document it, such as /v1/tables/{id}/columns:

Iterating Through All Results

Iterating Results

Filtering with Pagination

Combine pagination with filters for efficient data retrieval:
Filtering

Include Fields

Control which fields are returned in the response using the fields parameter:
Common field options for tables:
  • owner - Include owner information
  • tags - Include tags and classifications
  • columns - Include column definitions
  • followers - Include followers
  • tableConstraints - Include constraints
  • usageSummary - Include usage statistics

Best Practices

1

Use reasonable page sizes

Start with limit=50-100. Larger pages reduce API calls but increase memory usage.
2

Follow cursor pages sequentially

On cursor-paginated endpoints, always use the returned before and after cursors. Don’t try to construct cursor values manually.
3

Keep offset paging stable

On offset-paginated endpoints, keep filters and sort order fixed while incrementing offset predictably from one page to the next.
4

Handle empty results

Use the endpoint’s pagination signal to detect the end of results, such as a missing after cursor or an empty page.
5

Request only needed fields

Use the fields parameter to reduce response size and improve performance.
6

Implement retry logic

Handle transient errors gracefully when paginating through large datasets.
For finding specific resources, consider using the Search API instead of paginating through all results:

Search API

Learn about searching and filtering metadata