how to speed up adding members to groups via provisioning api in case of bulk amounts?..

46 views
Skip to first unread message

Maxim Volgin

unread,
Jun 16, 2011, 7:15:57 AM6/16/11
to google-app...@googlegroups.com
i have to add a few thousand users to a few hundred groups, it is the only way to do so?.. 

for (GenericEntry group : groups.getEntries()) {
for (UserEntry user : users.getEntries()) {
groupService.addMemberToGroup(group.getAllProperties().get("groupId"), user.getLogin().getUserName());

it's gonna be about two million api calls or more, not very efficient
maybe there is another way to add multiple users to groups, like providing lists of users/groups as parameters?..

Claudio Cherubino

unread,
Jun 16, 2011, 8:59:54 AM6/16/11
to google-app...@googlegroups.com
Hi Maxim,

The Provisioning API has no batch user creation method, what we recommend is using multiple threads to run requests in parallel.
The documentation has more details:


Thanks
Claudio

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/MFPhMHRcT8wJ.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Andrea Testa

unread,
Sep 7, 2012, 6:28:55 AM9/7/12
to google-app...@googlegroups.com
Hi Claudio,

Are there any news in this situation? I've tryed bulk upload with the batch mechanism of my Java client (I used the batch documentation published in Google Contacts API) but it doesn't work because Groups don't have a batch end-point url like contacts Api.

I know the way of multiple thread but I think that is not so easy to use because we have to set multiple users.

Does the Google Apps Directory Sync use batch process for this kind of operations?
Is it possible get the same speed of GADS in the groups operations?

Many thanks for your help
Andrea
Claudio

To unsubscribe from this group, send email to google-apps-mgmt-apis+unsub...@googlegroups.com.

Claudio Cherubino

unread,
Sep 7, 2012, 6:37:23 AM9/7/12
to google-app...@googlegroups.com
Hi Andrea,

I have no news as I'm not aware of any plans to introduce batch support in the API.
Our recommendation is still to use multiple threads.

I haven't checked how GADS works, but as it relies on the same API, it is quite likely that is relies on multi-threading.

Claudio


To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.

Jay Lee

unread,
Sep 7, 2012, 8:41:31 AM9/7/12
to google-app...@googlegroups.com
I recently wrote up some details about how I used GAM (which is single threaded) along with a fairly simple Linux Bash script to have multiple API calls going on in parallel:


So if you have an existing script to perform the adds, running it in parallel with Bash shouldn't be terribly difficult.

Jay
Claudio

Claudio


To unsubscribe from this group, send email to google-apps-mgmt-apis+unsubscri...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
Reply all
Reply to author
Forward
0 new messages