As a Contributor, I want to update a page, so that I can include more information or restructure the content.
PUT /page/{title}
Creates a new page or updates an existing page.
Request headers:
If-Unmodified-Since: only if the page hasn’t been modified
If-Match: only if the page currently has this etagNotable request headers: none
Payload: JSON
* source: source code (usually wikitext) of page
summary: summary of the updat* comment: summary of the update, to be set for the new revision
* latest: object with the following element
** id: ID of the revision this new source was based on; will be used for a three-way merge if applicable. If not present, treat like creating a new page
Status:
200 – it worked
401 – not authenticated
403 – not authorized
412 – precondition failed
Headers:
Location: page location404 - no such page (only if revision ID was submitted)
Last-Modified: new last modified date409 – a page with that title already exists (if no revision ID was submitted)
ETag: new Etag500 - server error, such as when a three-way merge failed
Notable response headers: none
Body: JSON
id: id of* id: numeric id of the page
* key: prefixed DB key of the page, like "Talk:Main_Page"
* title: title for display, like "Talk:Main Page"
* latest: latest revision of the page, object with these properties
** id: revision ID
** timestamp: revision timestamp
* license: SPDX code for the preferred license for the page
* other_licenses: array of SPDX codes for alternative licenses for the page
revision_id: revision ID of* contributors: array of User objects for the contributors to the pagee, each with these properties
title_key: prefixed DB key of the page, like "Talk:Main_Page" ** id: user ID
display_title: title for display, like "Talk:Main Page" ** name: user name
* source: wikitext source of the page