Pagination on zero_trust.devices.list only returns 1 page
@vaishakdinesh ci sta già lavorando.
Dal 30/6/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Confirm this is a Python library issue and not an underlying Cloudflare API issue.
- This is an issue with the Python library
Describe the bug
When using either the automatic pagination or the "has_next_page" manual pagination on the client.zero_trust.devices.list( endpoint, only 1 page is returned (20 devices).
The "has_next_page" function returns False.
This applies to async and non-async calls.
I can confirm that I have much more than 20 devices on the account, and the old API used to fetch them all.
This has been present in the lib for a while (months). I tried this lib out a while ago and found a few issues, but didn't get to reporting them then. I thought I'd mention that in case it helps narrow the issue down.
To Reproduce
- Try fetch all devices, either by automatic pagination or manual.
- Append to list
- Check length of list to find it's too short.
Code snippets
from cloudflare import Cloudflare
client = Cloudflare()
all_devices = []
for device in client.zero_trust.devices.list(account_id=***):
all_devices.append(device)
len(all_devices)
# In my case, outputs 20 instead of 91
OS
Ubuntu 24.04
Python version
3.12.3
Library version
v4.1.0
- Lingua principale
- Python
- Stelle
- 509
- Fork
- 150
- Merge medio
- 3h 15m
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/cloudflare-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
cloudflare/cloudflare-python#2747 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
cloudflare/cloudflare-python#2718 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
cloudflare/cloudflare-python#2692 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
cloudflare/cloudflare-python#2679 · 4 commenti · 5 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cloudflare/cloudflare-python#2745 · 1 commento ·
Tutte le issue di cloudflare/cloudflare-python
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
use-agent-os/agent-os#3314 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
BasedHardware/omi#15662 · 1 commento ·
-
documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
AiursoftWeb/AnduinOS-2#19 ·