Skip to content

Fix pagination param: use limit instead of batchSize for affected endpoints - #1

Merged
javrrr merged 1 commit into
mainfrom
fix/pagination-limit-param
Mar 25, 2026
Merged

Fix pagination param: use limit instead of batchSize for affected endpoints#1
javrrr merged 1 commit into
mainfrom
fix/pagination-limit-param

Conversation

@javrrr

@javrrr javrrr commented Mar 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • The Data 360 API uses batchSize on some endpoints and limit on others as the page-size query parameter
  • The SDK was hardcoding batchSize everywhere, silently breaking pagination on ~22 limit-based endpoints
  • Added pageSizeParam option to the pagination infrastructure ("batchSize" default, "limit" where needed)
  • Updated 12 resource services to use pageSizeParam: "limit" on the correct endpoints

Affected resources: connections, data-clean-room, data-lake-objects, data-model-objects, data-spaces, data-streams, data-transforms, document-ai, machine-learning, private-network-routes, segments (listMembers)

Test plan

  • Added unit tests for pageSizeParam: "limit" in pagination.test.ts
  • Updated data-streams.test.ts to assert limit is sent
  • Updated connections.test.ts and segments.test.ts assertions
  • Full test suite passes (208 tests)

Release

After merging, create a GitHub release with tag v0.1.1 to trigger the npm publish workflow.

…tchSize

The Data 360 API is inconsistent — some endpoints use `batchSize` as the
page-size query parameter while others use `limit`. The SDK was hardcoding
`batchSize` everywhere, causing pagination to silently fail on ~22 endpoints
that expect `limit` (the API would ignore the unrecognized param and use its
default page size).

Add a `pageSizeParam` option to the pagination infrastructure and set it to
`"limit"` in all affected resources: connections, data-clean-room,
data-lake-objects, data-model-objects, data-spaces, data-streams,
data-transforms, document-ai, machine-learning, private-network-routes,
and segments (listMembers).
@javrrr
javrrr merged commit d65d45e into main Mar 25, 2026
1 check passed
@javrrr
javrrr deleted the fix/pagination-limit-param branch March 26, 2026 12:18
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.

1 participant