Hi Fernando,
It does not look like the there is any specific identifier for course card in either Canvas Data or the API. It is a file and uploaded as an attachment with the Course context.
The file shows up in file_dim, with a folder ID, but I didn't select a folder. So I looked in the Course files and found one called course_image, it can contain 1 or more images. Canvas Data doesn't seem to contain any references to folder names, which means there is no way to query WHERE folder_name = 'course_image'
You could, possibly shoot for all something like
SELECT folder_id FROM CanvasLMS.dbo.file_dim WHERE owner_entity_type = 'course'
Files - Canvas LMS REST API Documentation
Then, do an API lookup for each folder_id, and get the name of each, which is commonly
course files/course_image
store the folder name, or flag the file as a possible course card (could be multiple files in the folder, maybe versions?)
Or...
If you have control or communication, naming conventions would make it a snap with a standard file name or prefix to the file name.
cc: Canvas Developers, Canvas Data Servicesā
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.