Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
betegon
force-pushed
the
bt/api-pagination-cursor
branch
from
October 26, 2026 15:16
b4cb377 to
4fe80fe
Compare
BYK
requested changes
Oct 26, 2026
BYK
left a comment
Member
There was a problem hiding this comment.
This should use the common pagination system in the repo now. We even have some custom cursors now. I'm surprised the lint rule did not catch this.
Otherwise, great change thanks a lot!
Member
|
I'd even argue we should let omitting the endpoint and other args or something so one can do |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sentry api --jsondiscarded the server'sLinkpagination metadata, so agents could receive a valid page without knowing how to continue. The JSON envelope now includes usablepagination.nextCursor/pagination.prevCursorvalues, and GET requests accept an opaque--cursortoken.Before
Even when the server advertised another page, the output contained no continuation (bodies abbreviated):
{"status":200,"statusText":"OK","body":[{"slug":"example-org"}]}After
The same command preserves the advertised cursor:
{"status":200,"statusText":"OK","body":[{"slug":"example-org"}],"pagination":{"nextCursor":"1:1:0"}}Repeat the request with that token to read the next page:
sentry api organizations/ -f per_page=1 --cursor '1:1:0' --json--cursorreplaces existing cursor parameters from the URL or fields while preserving other parameters;--dry-runpreviews the same request. Each invocation still fetches one page.--fieldsfilters only the body, so it retains pagination metadata. If the server advertises no usable cursor,paginationis omitted; that does not establish whether the underlying dataset was fully scanned.Covered by a two-page CLI E2E flow, cursor replacement and dry-run/request checks, non-GET rejection, and a bundled
sdk.api()test with an opaque token. URL fragments are excluded before composing the request, while encoded#characters in query values are retained; regression tests cover both existing-query and path-only URLs. Includes command help, docs, and the generated API skill reference. Logs pagination is deferred to a separate PR.Validation