Page MenuHomePhabricator

🟫 Add PUT statement endpoints to OpenAPI document
Closed, ResolvedPublic

Description

Request:

  • The format of the statement in the request body is the same as for the POST body. The ID will be ignored.
  • edit metadata
  • If-Match and If-Unmodified-Since headers

Responses:

  • On the successful replacement of the statement content, API would respond with 200 and response body contains the statement data.
    • this will include ETag and Last-Modified headers
  • Validation errors of item ID or statement ID result in a 400 response
  • Changing a statement's mainsnak property is disallowed and will also result in a 400 response
  • If the statement with the requested ID does not exist, API would respond with 404.
  • If the subject item of the statement is a redirect, API would also respond with 404
  • In case the ETag or last-modified timestamp provided is not the most recent version of the item, the API would response in 412 Precondition Failed response code.

Related Objects

Event Timeline

Change 814834 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):

[mediawiki/extensions/Wikibase@master] REST: Add "PUT statement" endpoints to OpenAPI

https://gerrit.wikimedia.org/r/814834

Change 814834 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Add "PUT statement" endpoints to OpenAPI

https://gerrit.wikimedia.org/r/814834

@Silvan_WMDE: Assuming this task is resolved. Thus setting resolved task status. Please reopen and add an active project tag if that is not the case. Thanks.