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

Implement looking up usernames by using specific API #8

Merged
merged 1 commit into from
Feb 13, 2018

Conversation

towolf
Copy link
Contributor

@towolf towolf commented Feb 13, 2018

The GET /users API is batched and resolving the usernames on large
instances fails.

There is a dedicated API to map user IDs to users, which get a list of
user_ids as an argument:

https://api.mattermost.com/#tag/users%2Fpaths%2F~1users~1ids%2Fpost

The GET /users API is batched and resolving the usernames on large
instances fails.

There is a dedicated API to map user IDs to users, which get a list of
user_ids as an argument:

https://api.mattermost.com/#tag/users%2Fpaths%2F~1users~1ids%2Fpost
@M-Mueller M-Mueller merged commit 5e9d539 into M-Mueller:master Feb 13, 2018
@M-Mueller
Copy link
Owner

So basically the previous code would only get 60 users at a time, correct?

@towolf
Copy link
Contributor Author

towolf commented Feb 13, 2018

Yes, 60 by default. This can be expanded to 200 using the per_page URL parameter, but our install has over 300 users, so a pagination would have to be used.

And anyway, sending a POST to /users/ids does exactly what is needed here.

@M-Mueller
Copy link
Owner

Makes sense. Also the code is much nicer now 👍

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.

2 participants