Page MenuHomePhabricator

🟪️ Conditionally request the data of an item statement
Closed, ResolvedPublic5 Estimated Story Points

Description

As a tool developer I want to only get data of the statement when it has changed so that I do not need to process data I already have. This should work the same way for both GET /entities/items/{item_id}/statements/{statement_id} and GET /statements/{statement_id}.

If-None-Match and If-Modified-Since request headers should be used for consistency with conditional requests to /entities/items/{item_id}

Use item's revision ID and item's last modification date as values to check against the user-specified ETag or modification date. Add a note to the OpenAPI document for these two routes that the ETag refers to the Item revision id. It should behave the same way as T302060.

See also https://wmde.github.io/wikibase-rest-api-proposal/#/statements/get_statements__statement_id_

Event Timeline

Jakob_WMDE set the point value for this task to 3.
Jakob_WMDE changed the point value for this task from 3 to 5.

Notes from task breakdown:

  • Add the if-none-match and if-modified-since headers to the list of parameters in the spec for single statement and item specific single statement
  • implement conditional requests for single statement
  • implement conditional requests for item specific single statement
  • spec tests for 304 response
Jakob_WMDE renamed this task from Conditionally request the data of an item statement to 🟪️ Conditionally request the data of an item statement.May 30 2022, 10:51 AM
Silvan_WMDE subscribed.

The newly added request headers and 304 responses are shown in the now published OpenAPI document and all conditional requests should be working as expected.