4

I am developing one app which will be used internally in our company. We are recommending our colleagues to contribute to StackOverflow. To keep the moral of employees high, I am planning to develop app which basically will be the leader board of StackOverflow.

I can get information about specific user (via ID).. But we are over 40 employees so I will have to call 40 requests. e.g. (api.stackexchange.com/2.1/users/1?site=stackoverflow, api.stackexchange.com/2.1/users/2?site=stackoverflow and so on) which definitely is not the good way.. It will cost around 40 calls each time..

Is there any better way to do? Like wrap all the user IDs in single call and get one JSON of multiple objects instead?

Please help me with the same!

1 Answer 1

6

Most routes that take an ID, including the /users route, will accept multiple values separated by semicolons. For example, a query like

/users/1%3B22656?site=stackoverflow

will give you results for both user 1 and user 22656. You can combine up to 100 ids in this fashion.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .