Pages API
Pages are rich content associated with Courses and Groups in Canvas. The Pages API allows this content to be enumerated and retrieved.
A Page object looks like:
{ // the unique locator for the page url: "my-page-title", // the title of the page title: "My Page Title", // the creation date for the page created_at: "2012-08-06T16:46:33-06:00", // the date the page was last updated updated_at: "2012-08-08T14:25:20-06:00", // whether this page is hidden from students // (note: students will never see this true; pages hidden from them will be omitted from results) hide_from_students: false, // the page content, in HTML // (present when requesting a single page; omitted when listing pages) body: "<p>Page Content</p>" }
List pages WikiPagesController#api_index
GET /api/v1/courses/:course_id/pages
GET /api/v1/groups/:group_id/pages
Lists the wiki pages associated with a course or group.
Example Request:
curl -H 'Authorization: Bearer <token>' \ https://<canvas>/api/v1/courses/123/pages
Show page WikiPagesController#api_show
GET /api/v1/courses/:course_id/pages/:url
GET /api/v1/groups/:group_id/pages/:url
Retrieves the content of a wiki page.
Request Parameters:
-
url
the unique identifier for a page. Use 'front-page' to retrieve the front page of the wiki.
Example Request:
curl -H 'Authorization: Bearer <token>' \ https://<canvas>/api/v1/courses/123/pages/front-page