Skip to main content

Pagination

All list endpoints in the JJHub API return paginated results using cursor-based pagination. Each response includes a next_cursor field in the body and a Link header for navigation.

Query Parameters

Both parameters are optional. If omitted, the API returns the first 30 results.
If limit exceeds 100, the API clamps it to 100 silently (no error).

Response Body

Every paginated response includes a next_cursor field alongside the result items:
When next_cursor is null, you have reached the end of the result set.

Response Headers

The Link header is provided for compatibility with tooling that expects RFC 8288 navigation. It contains cursor-based URLs:
The Link header includes only the relations that are relevant to the current page: When next is absent, you have reached the last page.
Using the next_cursor field from the response body is the recommended approach. The Link header is provided as a convenience for tools that consume it automatically.

Full Example

Request

Response Headers

Response Body

Code Examples

curl

JavaScript / TypeScript

Endpoints That Support Pagination

All list endpoints support pagination, including:
  • GET /api/repos/:owner/:repo/issues
  • GET /api/repos/:owner/:repo/landings
  • GET /api/repos/:owner/:repo/changes
  • GET /api/repos/:owner/:repo/bookmarks
  • GET /api/repos/:owner/:repo/workflows
  • GET /api/repos/:owner/:repo/runs
  • GET /api/repos/:owner/:repo/labels
  • GET /api/repos/:owner/:repo/milestones
  • GET /api/repos/:owner/:repo/stargazers
  • GET /api/user/repos
  • GET /api/user/starred
  • GET /api/orgs/:org/repos
  • GET /api/orgs/:org/members
  • GET /api/search/repositories
  • GET /api/search/issues
  • GET /api/search/code
  • GET /api/search/users

CLI Pagination

The jjhub CLI handles pagination automatically. Use --limit (short: -L) to control how many results are returned. The default is 30 and the maximum is 100, consistent across all commands.
The CLI handles cursor iteration internally. When using --json output, the response includes a next_cursor field so scripts can implement manual cursor-based pagination if needed.