Paginate through Canvas REST API submission results using Link headers without breaking access-token authentication.
domain: instructure.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Create an assignment with POST /api/v1/courses/:course_id/assignments using assignment[...] hash fields like name, submission_types, points_possible, and due_at.
Fetch submissions with GET /api/v1/courses/:course_id/assignments/:assignment_id/submissions, authenticating via an Authorization: Bearer header.
Read the response's Link header (rel="next", "prev", "first", "last") to walk through pages, since the default page size is only 10 items.
If authenticating via an access_token query parameter, manually re-append it to each Link URL, since Canvas strips it from generated Link header URLs.
Watch the X-Request-Cost header and back off before hitting a 403 Rate Limit Exceeded response from Canvas's cost-based throttling.
Known gotchas
access_token query-param auth breaks Link header pagination continuity unless you manually re-add the token to each URL.
Personal access tokens are shown only once at creation; developer-key-issued tokens expire in about an hour and need refresh handling.
Increasing per_page reduces request count but doesn't remove the need to still follow Link headers for very large courses.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?