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

Paged request APIEndpoint.v1.users.get returns duplicates and is missing data #291

Open
ashton-seek opened this issue Oct 31, 2024 · 2 comments
Labels

Comments

@ashton-seek
Copy link

Not sure if the API is at fault or the paging implementation here.

My request is simple:

let userRequest = APIEndpoint.v1.users.get(
      parameters: .init(
         filterUsername: email,
        filterRoles: role
    )
)

for try await page in provider.paged(userRequest) {
    for user in page.data {
        print(user.attributes?.username ?? "<nil>")
    }
}

But I get different results running this again and again, some users are printed twice, and some are missing. There are between 70-110 users in the accounts I'm querying.

@AvdLee
Copy link
Owner

AvdLee commented Nov 26, 2024

Could it be that you need a sorting configuration?

Copy link

This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants