I am unable to view all the courses for which i am an observer using the api

Jump to solution
NavinRamakrishn
Community Member

I am unable to view all the courses for which i am an observer using the api. https://canvas.instructure.com/api/v1/courses?access_token=<replace this with real access token>. For some courses i get "access_restricted_by_date": true which I get all details for other course. Why is this so?

How can i get around it?

Labels (1)
0 Likes
1 Solution
chriscas
Community Coach
Community Coach

Hi @NavinRamakrishn,

From what I have seen in our Canvas instance, observers access to a course (whether by API or through the GUI) is always strictly controlled by the course/term dates.  There are options in the term setup to allow teachers, students, teachers, tas, and designers to have additional access time outside of the term, but not for observers.  There are also optional checkbox settings to allow users to view courses before/after the dates, but those also do not seem to apply to observers.

So with all that said, I think what you're seeing is likely that when you're listing courses, some are available to you right now, which others have access dates that are either in the past or the future, so you cannot see the details for those.

Hope this helps!

-Chris

View solution in original post