Is it possible to send an array of objects in an API call?

Jump to solution
mmitchell
Community Contributor

I'd like to create a batch of new users via API rather than SIS but I'm struggling to figure out how to send an array of users and their details.

Is this possible? Am I looking at the post request incorrectly? I see nothing about arrays at api.instructure.com.

Is this another name for compound documents?

Thanks for any ideas!

Mike

Labels (1)
1 Solution
dgrobani
Community Champion

The API documentation for creating a new user only shows creating one user at a time, so I think you'd have to loop through your array and make one request at a time.

I run a weekly automated process that queries our SIS, formats the data into Canvas CSV files, then does an SIS import using the SIS Imports API. I'd be happy to share my Python code with you if you'd find it helpful.

Cheers,

Daniel

View solution in original post