[ARCHIVED] Bulk Outcome creation using the API

Jump to solution
brueckert
Community Champion

Hello all,

I'm attempting to write a script for the bulk creation of Outcomes in our instance of Canvas. I'm running into a problem and I'm curious if any of you all have a solution. First, I'm using Python 3.4 with the Requests library (which might be the problem for all I know). Here's my question: What is the proper syntax for adding descriptions and point values? I've tried a number of different solutions, but they either throw back internal server errors or something like this:

Capture.JPG

Here's the code I used for what appears above:

Capture.PNG

The following code gave me an internal server error:

Capture2.PNG

Am I doing something wrong or is this a limitation of Python/Requests, the API, or both? Thanks in advance for any help you can provide.

Labels (2)
1 Solution
mcowen
Instructure Alumni
Instructure Alumni

Brian,

There is a sample script at https://github.com/kajigga/canvas-contrib/tree/master/API_Examples

called import_outcomes.  Check it out, it might help in your troubleshooting.

You will also see several other sample scripts for other cool things you can do in the Canvas API.

I hope this helps!

View solution in original post