Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add API REST pagination doc #1990

Merged
merged 4 commits into from
Jan 9, 2025
Merged

feat: add API REST pagination doc #1990

merged 4 commits into from
Jan 9, 2025

Conversation

christiannwamba
Copy link
Contributor

Related Issue or Design Document

N/A

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

N/A

@CLAassistant
Copy link

CLAassistant commented Jan 6, 2025

CLA assistant check
All committers have signed the CLA.

@christiannwamba christiannwamba changed the title feat: Add API REST Pagination doc feat: add API REST pagination doc Jan 6, 2025
@aeneasr
Copy link
Member

aeneasr commented Jan 7, 2025

Thank you, this looks great! Could you please sign the CLA (just two clicks), then we can merge it right away!

@christiannwamba
Copy link
Contributor Author

Done. Thank you.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you for your contribution! This looks pretty good and I have some ideas how to improve it further :)


### Default behavior and parameters

By default, Ory paginates list data with a page size of 250 items per page. However, you can customize this behavior using two key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page size is typically dependent on the API and may also change in the future (ie get smaller or larger). There is usually a max page size

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I couldn't find a max page size value in both the response headers and body of admin/identities. Should I be looking somewhere else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/guides/pagination.mdx Show resolved Hide resolved
docs/guides/pagination.mdx Show resolved Hide resolved
docs/guides/pagination.mdx Show resolved Hide resolved
@aeneasr
Copy link
Member

aeneasr commented Jan 8, 2025

Unfortunately, the CI for playwright tests has been failing for some time. I can force merge the PR when it's ready to go :)

@christiannwamba
Copy link
Contributor Author

christiannwamba commented Jan 8, 2025

Not sure I understand this check that is making the Format task fail:

-- Do not attempt to reverse engineer or make assumptions about the page_token format, as it may change without notice. Always treat it as an opaque string.
+- Do not attempt to reverse engineer or make assumptions about the page_token format, as it may change without notice. Always
+treat it as an opaque string.

@christiannwamba
Copy link
Contributor Author

@vinckr pointed out it was a prettier thing. Updated

Copy link
Member

@jonas-jonas jonas-jonas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

CI failures are unrelated. And as for the formatting, we have a task running, that ensures all code in all repositories is uniformly formatted. Make sure to run make format if the "Format" task fails, or every time you finalize a change and commit the result. If you use an editor that supports prettier it should format everything automatically, though.

Copy link
Member

@vinckr vinckr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@christiannwamba
Copy link
Contributor Author

Thanks @jonas-jonas

@aeneasr aeneasr merged commit 24966c8 into master Jan 9, 2025
8 of 9 checks passed
@aeneasr aeneasr deleted the pagination branch January 9, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants