Question: API - Is it possible to allocate more user in a group with only 1 call?

22 views
Skip to first unread message

Christian Ricotti

unread,
May 27, 2014, 8:07:21 PM5/27/14
to valenc...@googlegroups.com
Dear Staff, I'm sorry to bother you, but I have a stupid question about the users allocation inside a groups.
Now for allocated an user inside a group I use the call:
"/d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/(groupId)/enrollments/"
and the params is "data = array('UserId' => 1234)".

My question is: if I have 100 users to allocate... is it mandatory use 100 calls?
I tried a lot of different way, for example "data = array(array('UserId' => 1234), array('UserId' => 5678))" but obviously doesn't work.
Exist or not the way to allocate more user in a group with only 1 call?

Thank you so much!
Christian

Desire2Learn Staff: Viktor

unread,
May 28, 2014, 9:34:09 AM5/28/14
to
Hey Christian,

We don't support manual, bulk enrollment in org units. You can configure groups on creation to auto-enroll users; however, if you want to manually (through the API) enroll one or more users in a group, you need to do it one user at a time.

You can use a POST route specifically for enrolling users in group, and you have to provide it with a Group.GroupEnrollment structure, which is a JSON structure containing only one property: a single user ID.

Christian Ricotti

unread,
May 28, 2014, 7:11:44 PM5/28/14
to valenc...@googlegroups.com
Dear Vickor, thank you for your answer.
Unfortunately... I knew what you wrote... :(
I'm very very very sorry about that, but I think it's a little bit strange, but I suppose exist a logical after this decision.
Thank you again.
Regards,
Christian

Desire2Learn Staff: Viktor

unread,
May 29, 2014, 9:35:31 AM5/29/14
to valenc...@googlegroups.com
The overall design of the Valence Learning Framework API was not optimized for bulk operations, but rather for individual operations supporting the activity of end-users (students and teachers). It's unfortunate, but not enough consideration was given to use-cases where bulk operations would be quite useful. Other clients have, in the past, also noticed this and pointed out that bulk operations would in many cases be very useful. This is one of the key general points that we have on the roadmap for platform improvement, but at this time, improvements to our developer platform are happening slowly.

We hope to offer features like this soon, but we don't have them on a firm roadmap that I can share at this time.

Christian Ricotti

unread,
May 30, 2014, 1:46:40 AM5/30/14
to valenc...@googlegroups.com
Dear Viktor thank you so much for you answer.
Yes, sure, I can understand. No problem.
Thanks again and have a good weekend.
Cheers
Reply all
Reply to author
Forward
0 new messages