The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
I had a working script at the end of last summer that doesn't seem to work lately. I think its got something to do with the response headers, for some reason the first next bookmark link returns no values. Here's the response headers it returns,
Initial call
https://example.instructure.com/api/v1/users/123/page_views?per_page=50
First response headers
<https://example.instructure.com/api/v1/users/123/page_views?page=first&per_page=50>; rel="current",
<https://example.instructure.com/api/v1/users/123/page_views?page=bookmark: - random characters - &per_page=50>; rel="next",
<https://example.instructure.com/api/v1/users/123/page_views?page=first&per_page=50>; rel="first"
first generated call
https://example.instructure.com/api/v1/users/123/page_views?page=bookmark: - random characters - &per_page=50
response headers
<https://example.instructure.com/api/v1/users/123/page_views?page=bookmark: - random characters - &per_page=50>; rel="current",
<https://example.instructure.com/api/v1/users/123/page_views?page=first&per_page=50>; rel="first",
<https://example.instructure.com/api/v1/users/123/page_views?page=bookmark: - random characters - &per_page=50>; rel="last"
I know other people aren't having this issue but I don't understand how to fix it. From what I can see everything is technically correct, but the first next page is empty when it shouldn't be. Is there a way to refresh the bookmark links to see if its some form of caching issue or anything?
It's not that there are exactly 50 page views for the user in question and that's why the first page is "full", but then the next page is the last page (and empty)?
Thanks for the response, but this is across all users I try this for. The user could have thousands of page views to list. But it'll only ever return the first page and nothing beyond that.
Hi Colin,
Are you using Curl, Postman, Python or other programming language?
If you are not set on using a specific tool or language, the Python Canvas API wrapper could be helpful, as it includes paging: https://canvasapi.readthedocs.io/en/stable/getting-started.html
Page views is under the user object:https://canvasapi.readthedocs.io/en/stable/user-ref.html
The API wrapper handles paging by pulling all responses into a dynamic list. You can iterate over the list and print the results to stdout or file.
If you are set on a specific tool or language, please let me know so I can provide a more focused answer. I'm willing to run tests using curl, postman or python to assist.
I am having this problem as well. It seems to be a bug on canvas's end or I have just not found the page where the documentation says this is expected behavior. Regardless if I use 10, 20, 50, 100, the next bookmark is always blank. Naturally this doesn't happen with other end points.
What happened with me was the next bookmark wasn't blank, it always gave the same results as the first page of results, so even though the code logic worked on other end points, this issue just occurred with the page views listing.
I got in contact with Canvas support and from what I understand they changed something in the background, and this worked again for me afterwards. So I didn't need to change anything on my side, Canvas support found the issue and seemed to solve it.
Thanks for the update. I will try reaching out to them as well. I wonder if this is an issue they will fix globally or if this a specific institution level "fix as the issue arises" type issue
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in