Skip to content

Document per_page max and silent clamping of oversized values#45189

Open
jornith wants to merge 1 commit into
github:mainfrom
jornith:patch-per-page-clamp
Open

Document per_page max and silent clamping of oversized values#45189
jornith wants to merge 1 commit into
github:mainfrom
jornith:patch-per-page-clamp

Conversation

@jornith

@jornith jornith commented Jul 17, 2026

Copy link
Copy Markdown

Why:

Closes: #45188

What's being changed (if available, include any code snippets, screenshots, or gifs):

Adds a paragraph to the "Changing the number of items per page" section of the pagination guide documenting that per_page is capped at 100 for most endpoints, and that values above the maximum are silently reduced rather than rejected. The request still returns 200 OK, so a caller relying on an oversized per_page can under-fetch results without any indication.

Verified against the live API: per_page=100000 returns 200 with the page clamped to 100 items (repro: test_oversized_per_page_is_clamped_not_rejected in https://github.com/jornith/octoprobe).

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

@github-actions

Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
rest/using-the-rest-api/using-pagination-in-the-rest-api.md fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17
fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Jul 17, 2026
@jornith jornith closed this Jul 17, 2026
@jornith
jornith deleted the patch-per-page-clamp branch July 17, 2026 17:36
@jornith
jornith restored the patch-per-page-clamp branch July 17, 2026 17:38
@jornith jornith reopened this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

per_page has no documented max, and oversized values are clamped silently

1 participant