@aday
I haven't seen an option to do this with the Canvas API. As far as I can tell, with the Canvas API, you would either need to do one of the following:
- Fetch each course individually using the Get a single course endpoint. If you make asynchronous calls, you could try to fetch multiple courses at a time, but be careful of throttling and making sure you don't request too many at once.
- Use the List active courses in an account endpoint with appropriate parameters to narrow the results as much as possible. Then, you would need to use a script to filter the results to only those with matching IDs.
- If the courses are all associated to a single user, you could potentially use the List courses for a user endpoint with appropriate parameters to narrow the results as much as possible. Then, use a script to filter these results to only those with matching IDs.
The best approach will likely depend on how many courses you are searching for and if the parameters for the list endpoints can be used to narrow down the results reasonably well.
If you are interested in this feature being available in the Canvas API, you could also submit an Idea to suggest this Feature Request. Be sure to check if anyone else has already submitted this as an Idea. If not, be sure to describe the issue not having this is causing and how adding support for this will help solve the problem.