If you are uploading CSV Imports (or zip files) to the SIS Imports API and are using PowerShell, would you care to share your syntax for setting up the Invoke-WebRequest?
Thanks
We previously used this one before I switched everything to using Python.
$sourceDir = "C:\path\to\store\csvs\" #this is source directory literal path $outputPath = "C:\path\to\store\outputzip\" #output path for the zip file creation $domain = "yourdomain.instructure.com" $account_id = "1" $token = "TOKEN_GOES_HERE" $outputZip = "ZIP FILE NAME.zip" # name of the zip file to create $url = "https://$domain/api/v1/accounts/"+$account_id+"/sis_imports.json?import_type=instructure_csv&batch_mode=1" $headers = @{"Authorization"="Bearer "+$token} $contentType = "application/zip" $InFile = $outputPath+$outputZip write-zip -Path $sourceDir"*.csv" -OutputPath $InFile $t = get-date -format M_d_y_h $status_log_path = $outputPath+$t+"LOG_FILE_NAME_HERE.log" $results1 = (Invoke-WebRequest -Headers $headers -InFile $InFile -Method POST -ContentType $contentType -Uri $url) $results1.Content | Out-File $status_log_path $results = ($results1.Content | ConvertFrom-Json) do{ Write-Host $status_line $status_url = "https://$domain/api/v1/accounts/"+$account_id+"/sis_imports/"+$results.id $results1 = (Invoke-WebRequest -Headers $headers -Method GET -Uri $status_url) $results1.Content | Out-File -Append $status_log_path $results = ($results1.Content | ConvertFrom-Json) Start-Sleep -s 300 if($results -eq $null){ break } } while($results.progress -lt 100 -and $results.workflow_state -ne "failed_with_messages") $results1.Content | Out-File -Append $status_log_path $download = $results.errors_attachment.url Move-Item -Force $outputPath$outputZip $outputPath$t-$outputZip Remove-Item $sourceDir*.csv
Hello, I am trying to query a course ID to check if it was cross listed. Do you know what is the data field to get this information or what query or API endpoint to use? I tried to use nonxlist_course_id, but received error 'doesn't exist on type course'.
UI for weekly progression idea that rest in the Schedule tab of the **K-12 UI** of Canvas it's incomplete and I really would not take it and push it into instance but I am going to post it here because in the past people like @James && @robotcars || @Steve_25 have had terrific input in the past... maybe w/their eyes and…
A case for this argument: I live in thee K-12 realm which means we have way too many assignments... which means that at times a simple last 10 assignments of a course question(last 10 date wise) will take us 300 assignments to answer Solution for this example in particular: I would love to make this modified version of an…
Hey Community: I want to ask first if Canvas LMS as a Identity provider is only supported with SAML? What other protocols are supported? My use case is that I have a React App hosted on cloud provider (AWS) and SpringBoot as a backend (Service provider). I want to integrate Canvas SSO as a Identity provider (IdP). I…
Hi , I’m working on validating the API test cases for CANVAS Api and need suitable test data to verify the 200 OK status code responses. I am using free for teachers version account. PFA Ecel sheet about the end points I am checking for.