Using diffing_data_set_identifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Good Evening!
I started using the API for our SIS imports a couple of months ago. We get an XML file from banner that has all enrollments for a specific term. I was able to remove students that switch courses using batch mode. However, this file log offs any students that are taking a quiz while the import is processing. I am thinking this happens because we upload the file with no parameters.
First, I just had an SH file and used task scheduler to upload the file at 2:00 am (to avoid disconnecting students). The code is the following:
curl -H 'Content-Type: text/xml' --data-binary @file1.xml \
-H "Authorization: Bearer tokengoeshere" \
https://name.instructure.com/api/v1/accounts/####/sis_imports.json?import_type=ims_xml&extension=xml
The problem with this is that we had to manually drop students every day.
Then, yesterday I made some changes and we don't have to manually remove students from courses any more! Here is the code:
curl -F attachment=@file1.xml \
-F batch_mode=1 \
-F batch_mode_term_id=sis_term_id:201930 \
-H "Authorization: Bearer AccessTokengoeshere" \
https://name.instructure.com/api/v1/accounts/####/sis_imports.json?import_type=ims_xml&extension=xml
I want to try diffing_data_set_identifier to avoid disconnecting students. If my thinking is correct, it should only add any new enrollments that appear in the file and not all of them at once. My question is, what is the correct syntax?
our current sis term id is 201930, would this be the identifier, or is it the name of the file that I am uploading. For example, if my file name is file1, then, do I use file1 as the identifier, or is it the SIS import ID from the last file imported?
I apologize in advance for any confusion. I am fairly new to the API. My new code will look something like this:
curl -F attachment=@file1.xml \
-F diffing_data_set_identifier="I need help here!!" \
-F diffing_drop_status="deleted" \
-H "Authorization: Bearer accesstokengoeshere" \
https://name.instructure.com/api/v1/accounts/#####/sis_imports.json?import_type=ims_xml&extension=xm...
Any other tips or suggestions are appreciated!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use anything you want for the diffing_data_set_identifier.
The key thing is that the diffing will be done against the previous import with the same diffing_data_set_identifier.
If your enrolment import files are always for a single term, then using the term as the data set identifier would make sense.
The documentation only mentions diffing for CSV imports, so you might want to check things carefully in a beta/test environment.