Question

Is there any API, where I can pass branch id/name and get list of users along with assigned groups?

  • 20 December 2022
  • 9 replies
  • 274 views

Hello Team,

I am looking for an API, which takes branch id/name as a request parameter and returns all the uses under that branch along with assigned groups/roles in a response. Could you please help in this.

Thank you.


9 replies

Userlevel 7
Badge +3

There’s no one API that would do this. You would need to do a series of them, and depending on your goal, sometimes it is better to simply use a report for this. Otherwise you’re kind of in the realm of individual user info api to get info, and that won’t get groups. Closest I can think of quickly is to do an api call for list of users using branch ID as the filter, so all those users are definitely in that branch, then do api calls of basically all groups and filter the users as I am not aware of a way to find groups a user is in via the api directly.

Could you please help in providing API details for following as suggested:

  1. Which can be used to find list of users using branch ID
Userlevel 7
Badge +3

.Sure, it’s under Manage > User > Returns list of users in the API Browser:

 

Is there any restriction on number of API call per day as well as on number of records?

Userlevel 7
Badge +3

Is there any restriction on number of API call per day as well as on number of records?

The safety recommendation for best performance as per Docebo is 1,000 calls per hour per IP address source. It is not a hard limit, but should be respected for performance.

You really might want to look at reports as a starting point and then maybe use the API off of them.

How about restriction on number of records?

We have couple of branches in which number of users are in millions. If I need to use this API, can I get all the records in one go with branch id as a filter criteria?

Userlevel 7
Badge +3

How about restriction on number of records?

We have couple of branches in which number of users are in millions. If I need to use this API, can I get all the records in one go with branch id as a filter criteria?

No, it will paginate, you will need to page through the results and combine them all, another reason reports are probably better for this type of thing.

Actually, we have tried exporting data from UI, but it is very slow and sometimes process gets stuck for several hours and we have to terminate that manually. That’s why we are looking for an API option as an alternative.

Userlevel 7
Badge +3

I’m not saying to export from there, but to use the report as the colector of information. There are API’s to pull report information, or you can look into the automation app to auto send the data to a location which triggers processes. I tend to use reports in combination with the API for large datasets.

Reply