Diffing CURL Commands

RobertGainer
Community Member
1
1285

Hello,

We are trying to set up Diffing mode to run our SIS files and are using the below CURL command.

/usr/bin/curl --tlsv1.2 -H 'Content-Type: application/octet-stream' -F diffing_data_set_identifier=DiffID -F attachment=@/home/batch/Canvas/canvasfiles.zip --output /dev/null --write-out '%{http_code}' --stderr /tmp/CANVAS.07072021.7995592.err.canvasfiles.zip -H "Authorization: Bearer TOKEN" https://oursite.edu/api/v1/accounts/1/sis_imports.json?import_type=instructure_csv&extension=zip 

Unfortunately the files are not updating anything in the system. Does anyone see anything wrong with our CURL command that may be causing this issue to occur?

Thanks,

Robert

Tags (2)
1 Comment
lmsstaff
Community Participant

You don't want to use octet-stream with form data.  Here is an example for us, but we don't use curl but a Python script using Requests:

curl ---url https://everettsd.test.instructure.com/api/v1/accounts/1/sis_imports
--header "Authorization: Bearer 3595~<token>"
--header "Content-Type: multipart/form-data"
-F extension=zip
-F diffing_data_set_identifier=EpsCurCanvasExtracts
-F diffing_remaster_data_set=false
-F change_threshold=99
-F override_sis_stickiness=true
-F attachment=@D:\EpsCurCanvasExtracts.zip

 

Hope that helps.