cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Member

Trying to push files to SIS endpoint with Batch Mode


Hi All,

I'm attempting to make a new program to do nightly updates. Currently I have had a working program that was able to use the SIS endpoints to do nightly batch updates (still works fine for what it does). Now, however, I need to separate out some of the things I was sending up, for instance:

Previously I was sending student enrollments and faculty enrollments together, in one file per term (2016 Spring for instance). The batch ID was the term ID.

Now, I will be separating out the enrollments in to separate files, one for faculty, one for students. One file per term.

1) Do I have to do anything to associate records with the new Batch ID? In our previous LMS all records were tied to an import ID, and if we tried pushing data with another ID (without first changing it over) it would error out and be ignored. I would test this out, buuuuut....

2) I'm having an issue. I've been able to successfully send up the files (tried Curl, PowerShell and C#). However, when I attempt to specify batch mode and provide the Batch ID, I'm getting the following error:

Batch mode specified, but the given batch_mode_term_id cannot be found.

I assume this may be related to the first question, but if not what can I do to avoid this?

Thanks for your time!

Spencer Varney

Tags (2)
1 Reply
Highlighted
Surveyor II

I have never used batch mode, I have a workflow engine that automates all of our SIS imports, and removal of assets is handled by the status defined in the records.

To quote the API document:  SIS Import Format Documentation - Canvas LMS REST API Documentation

"Use this option with caution, as it can delete large data sets without any prompting on the individual records. Currently, this affects courses, sections and enrollments."

Here is the definition of batch_mode_term_id:

//The term the batch was limited to.
 
"batch_mode_term_id": "1234"

To address 1) according to the definition of the field, this would be the unique id of the term of interest

To address 2) try entering the unique term id

I strongly suggest doing this in test or beta.

Again, I have never used batch mode, as it can wipe data unexpectedly.

Is there a reason you are not able to modify records based on the "status" field?