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

Missing Pagination for List of Directs #612

Open
temporaer opened this issue Oct 28, 2024 · 2 comments
Open

Missing Pagination for List of Directs #612

temporaer opened this issue Oct 28, 2024 · 2 comments
Labels
area:documentation Focused on documentation of the product documentation Improvements or additions to documentation type:documentation General documentation request or project documentation update

Comments

@temporaer
Copy link

Describe the bug

I am fetching directs via client.users.by_user_id(user_id).direct_reports.get(). The list is incomplete for users with many directs. Browsing through the code a bit, it seems that this API ignores the nextLink property and only returns the first page.

Expected behavior

The list of returned directs should be complete.

How to reproduce

  • create user user_id with many directs
  • fetch direct reports of this user with client.users.by_user_id(user_id).direct_reports.get()
  • confirm not all results are returned.

SDK Version

1.11.0

Latest version known to work for scenario above?

none.

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

- OS: Ubuntu 22.04
- arch: x86


### Other information

_No response_
@temporaer temporaer added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Oct 28, 2024
@temporaer
Copy link
Author

@samwelkanda @baywet -- tagging some regulars here, are you guys monitoring the issues list? Thanks!

@baywet
Copy link
Member

baywet commented Nov 19, 2024

Hi @temporaer
Thank you for using the SDK and for reaching out.

You can use the page iterator to page through the different pages automatically.

Unfortunately, there's no documentation sample for Python yet, but using the other languages and reading the source you should be able to extrapolate. CC @jasonjoh

Let us know if you have any additional comments or questions.

@baywet baywet added documentation Improvements or additions to documentation type:documentation General documentation request or project documentation update area:documentation Focused on documentation of the product and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation Focused on documentation of the product documentation Improvements or additions to documentation type:documentation General documentation request or project documentation update
Projects
None yet
Development

No branches or pull requests

2 participants