Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
I am trying to call SISimport API with the attachment csv file, there's error indicating "Couldn't find Canvas CSV import headers", and also noted in SIS importing log that "downloadable_attachment_ids" did not get any file information. While I attached the same csv file, directly call sisimport using cUrl command line, it works fine. So, is something I missed during passing the file params? Thanks in advance!
Ruiling
$testcsv= 'enrollments.csv';
$file_name_with_path =realpath('./'$testcsv);
$postdata = array(
'name'=> $testcsv,
'file' => '@'.$file_name_with_path);
$testheaders = array(
'Content-Type: text/csv');
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $myUrl.'accounts/'.$AccountId.'/sis_imports.json?import_type=instructure_csv&extension=csv&access_token='.$apiToken,
CURLOPT_HTTPHEADER =>array('Content-Type:text/csv'),
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $postdata
));
Hi there, @tadm9280 ...
I am reviewing some of the older questions here in the Community, and I came across your question. Although I don't really have an answer for you, I wanted to check with you because I noticed that we have not heard back from you since you first posted your question on September 4, 2019. It looks like you may have stumped Community members with your question. Have you been able to find any solutions on your own since you first posted your question five months ago? If so, would you be willing to share your findings with us back here in this topic? Or, if you are still looking for some help with this question, please let us know that as well. Either way, we would like to hear back from you. For now, I am going to mark your question as "Assumed Answered"...not because we've been able to find a solution for you...but more because we've not heard back from you and because there hasn't been any new activity in this topic since September. However, that won't prevent you or others from posting additional questions and/or comments below that are related to this topic. I hope that's okay with you. Looking forward to hearing back from you soon.
To participate in the Instructure Community, you need to sign up or log in:
Sign In
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.