I would also like to know if its possible to perform batch operations with the REST API. Right now we are using a script to empty some security groups and then fill them again with the right users. This script runs daily, and as our community grows, it take a really long time only to remove users from security groups (about 1,5 hours only for removing ~ 1500 users from 5 security groups). This is really long to empty 5 security groups!! I think I would probably be faster manually.
Is there a way to send those request in batch in order to make it faster (or even better, empty them with a single request!!!).
I know this is not the best way to do, and we will look into managing the users in our security groups more elegantly in order to drop the number of request made, but still, I would really like to know if there is a way to batch similar request.
From what I've seen from Using Batch Operations with the V3 API, it doesnt seem to be what we are looking for (its more to make a sequence of call and re-use parameters from previous calls).
I believe you just add a body property to the request and change the method to POST or DELETE or PUT depending on your operation..... As you can see its a JSON Array so you can mix and match your operations and I believe it runs in order of the 'array'..
"text": "<body><p>Here is some content</p></body>"
But the documentation is lacking.. So good luck. If you just pop open fiddler and fiddler around for a few minutes you will figure it out. Also, according to the docs, they use JSONPath, and allow for cross referencing other previous operations in the batch process in future operations... I haven't messed with this yet.