Found this content helpful? Log in or sign up to leave a like!

Canvas API page-view next response header not appearing

ColinOBrien
Community Member

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?

0 Likes