Page MenuHomePhabricator

Contributor updates a page slot
Open, Needs TriagePublic

Description

"As a Contributor, I want to update a slot of a page, so that I can improve the page."

PUT /page/{title}/slot/{role}

Change the content of slot with role role for page with title title. Can also be used to create the slot if no id is provided.

Request body: JSON object with the following properties

  • latest: latest slot ID we know about; used for conflict resolution
  • source: source of the slot

Notable request headers: none

Status codes:

  • 200: the slot was updated; body contains new slot descriptor
  • 401: updating this slot requires authentication and the user is not authenticated
  • 403: the authenticated user is forbidden from updating this slot
  • 404: no such page
  • 404: no such slot (only if slot ID was included)
  • 409: a slot with that role already exists (if no slot ID was submitted)
  • 409: the slot has been edited since the slot ID provided, and an automatic merge failed (see below)

Notable response headers: none

Response body: JSON object representing the new slot, including:

  • id: ID of the slot
  • content_model: content model of the slot
  • size: size of the slot
  • source: source of the slot