Skip to content

fix: Fixed ZCC pagination has_next() on flat-array list endpoints (#563) - #564

Merged
willguibr merged 2 commits into
masterfrom
zcc-#563-fix-pagination-has-next
Aug 18, 2026
Merged

fix: Fixed ZCC pagination has_next() on flat-array list endpoints (#563)#564
willguibr merged 2 commits into
masterfrom
zcc-#563-fix-pagination-has-next

Conversation

@willguibr

@willguibr willguibr commented Aug 18, 2026

Copy link
Copy Markdown
Member

ZCC list endpoints (e.g. /getDevices) return flat JSON arrays, which the pagination engine marked as non-paginated, so has_next() always returned False after the first page. ZCC now joins ZIA in the flat-list carve-out and drives pagination via its 1-based page/pageSize params, with proper page-size limits (default 50, max 5000) and page-counter seeding from a user-supplied page param. All changes are scoped to service_type "zcc".

Provide a general summary of your changes in the title above. You should
remove this overview, any sections and any section descriptions you
don't need below before submitting. There isn't a strict requirement to
use this template if you can structure your description and still cover
these points.

Description

Describe your changes in detail through motivation and context. Why is
this change required? What problem does it solve? If it fixes an open
issue, link to the issue using GitHub's closing issues keywords1.

Has your change been tested?

Explain how the change has been tested and what you ran to confirm your
change affects other parts of the code. Automated tests are generally
expected and changes without tests should explain why they aren't
required.

Screenshots (if appropriate):

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented and stable APIs.

ZCC list endpoints (e.g. /getDevices) return flat JSON arrays, which the
pagination engine marked as non-paginated, so has_next() always returned
False after the first page. ZCC now joins ZIA in the flat-list carve-out
and drives pagination via its 1-based page/pageSize params, with proper
page-size limits (default 50, max 5000) and page-counter seeding from a
user-supplied page param. All changes are scoped to service_type "zcc".
@willguibr willguibr self-assigned this Aug 18, 2026
@willguibr willguibr added the 🐛 type/bug :bug: type/bug label Aug 18, 2026
@willguibr willguibr moved this to ⚙️ In development in Zscaler Automation Dashboard 🛣 Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
zscaler/oneapi_response.py 66.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@willguibr
willguibr merged commit f22a1dd into master Aug 18, 2026
73 checks passed
@github-project-automation github-project-automation Bot moved this from ⚙️ In development to 🚀 Shipped in Zscaler Automation Dashboard 🛣 Aug 18, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 18, 2026
### [1.9.42](v1.9.41...v1.9.42) (2026-08-18)

### Bug Fixes

* Fixed ZCC pagination has_next() on flat-array list endpoints ([#563](#563)) ([#564](#564)) ([f22a1dd](f22a1dd))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 type/bug :bug: type/bug

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

[ISSUE] .has_next() does not return true properly on ZscalerClient.zcc.devices.list_devices(), despite there being more pages

1 participant