Register for InstructureCon25 • Passes include access to all sessions, the expo hall, entertainment and networking events, meals, and extraterrestrial encounters.
Found this content helpful? Log in or sign up to leave a like!
I am getting a redirect when I request the second page of sis_imports. Is this an issue with my request?
The initial request is:
curl -i https://ucmerced.test.instructure.com/api/v1/accounts/1/sis_import -H Authorization: Bearer <token>
This gets me a list of sis_imports encoded in JSON as desired. The Link header is:
Link: <https://ucmerced.test.instructure.com/accounts/1/sis_imports?page=1&per_page=10>; rel="current",<https://ucmerced.test.instructure.com/accounts/1/sis_imports?page=2&per_page=10>; rel="next",<https://ucmerced.test.instructure.com/accounts/1/sis_imports?page=1&per_page=10>; rel="first",<https://ucmerced.test.instructure.com/accounts/1/sis_imports?page=381&per_page=10>; rel="last"
However, when I request the next page, https://ucmerced.test.instructure.com/accounts/1/sis_imports?page=2&per_page=10, I get redirected:
HTTP/1.1 302 Found
Cache-Control: must-revalidate, no-cache, no-store, private, max-age=0
Content-Type: text/html; charset=utf-8
Date: Wed, 24 Jun 2015 15:22:54 GMT
Location: https://ucmerced.test.instructure.com/login
(etc.)
<html><body>You are being <a href="https://ucmerced.test.instructure.com/login">redirected</a>.</body></html>
This is happening in test, beta, and production. It is not occurring with any other APIs (that I recall), such as enrollments or courses.
Solved! Go to Solution.
Hi Josh,
I ran into the same issue. api/v1/ does not get added to the pagination URLs in the header. I had talked to an engineer at InstructureCon and they fixed the issue but is still has not been reviewed to be added to the code base. In the meantime you could break the URL apart and insert api/v1/ and then run the API call.
Best,
Tyler Clair
@jswink , given the highly technical nature of your question would it be ok if I moved it over to the Canvas Developers group? It seems like you'd get better and more timely responses over there!
Thanks!
Thanks, Kona, that would be great.
Done! Just make sure and join the Canvas Developers group so you can join in on all the fun!
Hi Josh,
I ran into the same issue. api/v1/ does not get added to the pagination URLs in the header. I had talked to an engineer at InstructureCon and they fixed the issue but is still has not been reviewed to be added to the code base. In the meantime you could break the URL apart and insert api/v1/ and then run the API call.
Best,
Tyler Clair
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In