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 \<BR /> -H "Authorization: Bearer tokengoeshere" \<BR /> <A href="https://name.instructure.com/api/v1/accounts/####/sis_imports.json?import_type=ims_xml&extension=xml" target="test_blank" rel="nofollow noopener noreferrer">https://name.instructure.com/api/v1/accounts/####/sis_imports.json?import_type=ims_xml&extension=xml</A><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
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 \<BR />-F batch_mode=1 \<BR />-F batch_mode_term_id=sis_term_id:201930 \<BR /> -H "Authorization: Bearer AccessTokengoeshere" \<BR /> <A href="https://name.instructure.com/api/v1/accounts/####/sis_imports.json?import_type=ims_xml&extension=xml" target="test_blank" rel="nofollow noopener noreferrer">https://name.instructure.com/api/v1/accounts/####/sis_imports.json?import_type=ims_xml&extension=xml</A><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
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 \<BR />-F diffing_data_set_identifier="I need help here!!" \<BR />-F diffing_drop_status="deleted" \<BR />-H "Authorization: Bearer accesstokengoeshere" \<BR /> <A href="https://name.instructure.com/api/v1/accounts/#####/sis_imports.json?import_type=ims_xml&extension=xml" target="test_blank" rel="nofollow noopener noreferrer">https://name.instructure.com/api/v1/accounts/#####/sis_imports.json?import_type=ims_xml&extension=xml</A><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Any other tips or suggestions are appreciated!!