Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
Hi all,
I built a canvas integration which can pull in a user's current enrolled courses and drill down to show the user's public navigation tabs (assignments, grades, syllabus, etc.) The problem I'm having is that I'm not getting any tabs returned from the API. Here's the call:
`GET /api/v1/courses/:course_id?include[]=tabs`
What I expect to see in the object returned is a 'tabs' property with an array of the available navigation tabs like shown here: https://canvas.instructure.com/doc/api/tabs.html#method.tabs.index
Instead, a 200 response code shows me course details without any tabs.
I have checked to make sure in the course settings > navigation section of the instance I'm testing with, that there are available items in the navigation stack. Also for reference I'm using a test user that is enrolled as a student.
Is there anything I might have missed to enable this feature?
This is an example response I receive:
Hello Jenny,
I use the following call: /api/v1/courses/<canvas_id>/tabs?per_page=100 - notice that "/tabs" is not an include.
I've never used that call to get the navigation. I was not able to pull anything for tabs using that call. Looking at the change logs (since you said it previously worked), I don't see anything indicating changes. You may want to file a ticket.
Change log: https://community.canvaslms.com/t5/Canvas-Change-Log/2022-API-Change-Log/ta-p/509738
Hi,
I get results with your API call, I guess it has something to do with the course-settings or the user-account of the teststudent. Do you get tabs in the response of this call with the user-id of your teststudent: /api/v1/users/:testuser_id/courses?include[]=tabs
"tabs" is a valid include, calling /api/v1/courses/139?include[]=tabs works fine for me and returns tabs, which looks to be exactly what you're doing.
To participate in the Instructure Community, you need to sign up or log in:
Sign In