List external tools does not return data for courses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm working on a report to find which LTIs have been enabled on which courses, but GET /api/v1/courses/:course_id/external_tools is returning a blank array. I can get LTI data using the accounts endpoint with various account ids, but no such luck with courses. Has anyone else run into this problem? Here's some more specific information in case it's helpful:
Working: GET /api/v1/accounts/110/external_tools -> returns status_code 200 and a bunch of LTI data
Not working: GET /api/v1/courses/20678/external_tools -> returns status_code 200 and '[]'
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hiya @RanjeetSingh
When inside a course you can add the `include_parents` parameter as documented on: https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index
For example as (course ID of 20678):
https://instance.intructure.com/api/v1/courses/20678/external_tools?include_parents=true
However this just lists the tools that are "available" in a course, when you say "enabled" what do you mean? You can select an LTI tool to be available in a course but the navigation to be hidden by default, if so then you can use the Tabs API to see which tabs have been enabled in a course:
https://canvas.instructure.com/doc/api/tabs.html#method.tabs.index
If you are wanting to see which courses have added custom LTIs to the site then using the LTI account report is the best way to see which courses have added their own APIs as it allows you to get all LTIs in one request:
https://community.canvaslms.com/t5/Admin-Guide/How-do-I-view-reports-for-an-account/ta-p/109
if you need to run this report through the API then its documented on:
https://canvas.instructure.com/doc/api/account_reports.html
For LTI 1.1 tools it's common to configure tools in accounts and also in courses, however for LTI 1.3 tools it's only possible to configured tools in the root account (as a Developer Key), but then they can be added to courses and accounts.