Skip to content

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

Description

@jornith

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api

What part(s) of the article would you like to see updated?

The per_page section says you can control page size. No max, no note on what happens past it.

per_page=100000 returns 200 with the page clamped to 100. No error. This same doc set uses 422 for invalid params elsewhere, so clamping instead of rejecting is a real surprise — a caller can under-fetch results and never know it.

Add the max value and the clamp behavior here.

Additional information

Reliably reproducible. Verified with a black-box pytest suite: test_oversized_per_page_is_clamped_not_rejected in https://github.com/jornith/octoprobe

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the team

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions