NOTE: You cannot specify the ID when creating a page. If you pass a numeric value as the page identifier and that does not represent a page ID that already exists, it will be interpreted as a URL.
Request Parameters:
Parameter
Type
Description
wiki_page[title]
string
The title for the new page. NOTE: changing a page’s title will change its url. The updated url will be returned in the result.
{
// the ID of the page
"page_id": 1,
// 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",
// (DEPRECATED) whether this page is hidden from students (note: this is always
// reflected as the inverse of the published value)
"hide_from_students": false,
// roles allowed to edit the page; comma-separated list comprising a combination
// of 'teachers', 'students', 'members', and/or 'public' if not supplied, course
// defaults are used
"editing_roles": "teachers,students",
// the User who last edited the page (this may not be present if the page was
// imported from another system)
"last_edited_by": null,
// the page content, in HTML (present when requesting a single page; optionally
// included when listing pages)
"body": "<p>Page Content</p>",
// whether the page is published (true) or draft state (false).
"published": true,
// scheduled publication date for this page
"publish_at": "2022-09-01T00:00:00",
// whether this page is the front page for the wiki
"front_page": false,
// Whether or not this is locked for the user.
"locked_for_user": false,
// (Optional) Information for the user about the lock. Present when
// locked_for_user is true.
"lock_info": null,
// (Optional) An explanation of why this is locked for the user. Present when
// locked_for_user is true.
"lock_explanation": "This page is locked until September 1 at 12:00am",
// The editor used to create and edit this page. May be one of 'rce' or
// 'block_editor'.
"editor": "rce",
// The block editor attributes for this page. (optionally included, and only if
// this is a block editor created page)
"block_editor_attributes": {"id":278,"version":"0.2","blocks":"{...block json here...}"}
}
{
// an identifier for this revision of the page
"revision_id": 7,
// the time when this revision was saved
"updated_at": "2012-08-07T11:23:58-06:00",
// whether this is the latest revision or not
"latest": true,
// the User who saved this revision, if applicable (this may not be present if
// the page was imported from another system)
"edited_by": null,
// the following fields are not included in the index action and may be omitted
// from the show action via summary=1 the historic url of the page
"url": "old-page-title",
// the historic page title
"title": "Old Page Title",
// the historic page contents
"body": "<p>Old Page Content</p>"
}
curl -X POST -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/the-page-identifier/revisions/6
wiki_page[editing_roles]
string
Which user roles are allowed to edit this page. Any combination of these roles is allowed (separated by commas).
“teachers”
Allows editing by teachers in the course.
“students”
Allows editing by students in the course.
“members”
For group wikis, allows editing by members of the group.
“public”
Allows editing by any user.
Allowed values: teachers, students, members, public
wiki_page[notify_of_update]
boolean
Whether participants should be notified when this page changes.
wiki_page[published]
boolean
Whether the page is published (true) or draft state (false).
search_term
string
The partial title of the pages to match and return.
published
boolean
If true, include only published paqes. If false, exclude published pages. If not present, do not filter on published status.
include[]
string
“body”: Optionally include the page body with each Page.
If this is a block_editor page, returns the block_editor_attributes.
Allowed values: body
wiki_page[editing_roles]
string
Which user roles are allowed to edit this page. Any combination of these roles is allowed (separated by commas).
“teachers”
Allows editing by teachers in the course.
“students”
Allows editing by students in the course.
“members”
For group wikis, allows editing by members of the group.
“public”
Allows editing by any user.
Allowed values: teachers, students, members, public
wiki_page[notify_of_update]
boolean
Whether participants should be notified when this page changes.
wiki_page[published]
boolean
Whether the page is published (true) or draft state (false).
wiki_page[front_page]
boolean
Set an unhidden page as the front page (if true)
wiki_page[publish_at]
DateTime
Schedule a future date/time to publish the page. This will have no effect unless the “Scheduled Page Publication” feature is enabled in the account. If a future date is supplied, the page will be unpublished and wiki_page[published] will be ignored.
wiki_page[editing_roles]
string
Which user roles are allowed to edit this page. Any combination of these roles is allowed (separated by commas).
“teachers”
Allows editing by teachers in the course.
“students”
Allows editing by students in the course.
“members”
For group wikis, allows editing by members of the group.
“public”
Allows editing by any user.
Allowed values: teachers, students, members, public
wiki_page[notify_of_update]
boolean
Whether participants should be notified when this page changes.
wiki_page[published]
boolean
Whether the page is published (true) or draft state (false).
wiki_page[publish_at]
DateTime
Schedule a future date/time to publish the page. This will have no effect unless the “Scheduled Page Publication” feature is enabled in the account. If a future date is set and the page is already published, it will be unpublished.