Is it possible to get a single canvas_course_id or an array of canvas_course_ids returned using the API? Here's what I'm running.
curl -s -F attachment=@"$zip_file" -F "extension=zip&import_type=instructure_csv" -H "$AUTH_HEADER" "https://$MYDOMAIN.instructure.com/api/v1/accounts/self/sis_imports
Hi Thomas --
It's not possible to get a list of Canvas course IDs that were created/updated via SIS import. The SIS import endpoint just returns an SIS import ID, and the actual import job is processed asynchronously. You can use that import ID to retrieve the status of the overall job, but you can't get information about the Canvas courses that were created, etc.
As Nick suggests, you can use the Accounts endpoint to fetch all (or a subset) of the courses under a particular account, but you can't just fetch the ones that were created by the last SIS import. Perhaps you could filter by term or status to get the list of courses/IDs that you need.
Just tagging on to this... if you're looking only for SIS imported courses.....
If you get a list of courses using the Accounts - Canvas LMS REST API endpoint, then you can loop through and check to see which of the course objects have a value in the "sis_course_id" field.
Each course object looks like this: Courses - Canvas LMS REST API Documentation
Partial example here:
//the unique identifier for the course
//the SIS identifier for the course, if defined. This field is only included if
//the user has permission to view SIS information.
//the integration identifier for the course, if defined. This field is only
//included if the user has permission to view SIS information.
//the full name of the course
As you can see, one of the attributes will be named "sis_course_id" .... and if that value has a value, then it has most likely been imported via a SIS Import. Of course, this is not 100%, because you can enter a SIS id for a course manually via the UI... but it's better than nothing.
email@example.com, after you've created your feature idea, would you take a moment to circle back here and post the link to it? It will not only close the circle on this discussion but could also help drum up support.