Skip to content

Document per_page max and silent clamping of oversized values - #45189

Merged
Sharra-writes merged 2 commits into
github:mainfrom
jornith:patch-per-page-clamp
Jul 31, 2026
Merged

Document per_page max and silent clamping of oversized values#45189
Sharra-writes merged 2 commits into
github:mainfrom
jornith:patch-per-page-clamp

Conversation

@jornith

@jornith jornith commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Jul 17, 2026

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
@Sharra-writes Sharra-writes added content This issue or pull request belongs to the Docs Content team rest Content related to rest - overview. needs SME This proposal needs review from a subject matter expert and removed triage Do not begin working on this issue until triaged by the team labels Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀

@Sharra-writes

Copy link
Copy Markdown
Contributor

@jornith Also checking in about this one.

@Sharra-writes

Copy link
Copy Markdown
Contributor

@jornith This one also looks good, thanks!

@Sharra-writes
Sharra-writes added this pull request to the merge queue Jul 31, 2026
Merged via the queue into github:main with commit ee5047f Jul 31, 2026
42 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content This issue or pull request belongs to the Docs Content team needs SME This proposal needs review from a subject matter expert rest Content related to rest - overview.

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

2 participants