Page MenuHomePhabricator

REST API PUT request does not handle statement of items with lowercase IDs
Closed, ResolvedPublicBUG REPORT


Steps to replicate the issue (include links if applicable):

  • Use the Wikibase REST API to call a PUT request on Property:P570 of Robert Nixon Q7348050

Based on the issue reported here: (original link)

What happens?:

  • The API returns a 404 statement not found

What should have happened instead?:

  • The proposed change in statement should have been successful

Software version (skip for WMF-hosted wikis like Wikipedia):

  • REST API beta version on Wikidata

Task Breakdown Notes

  • Option 1: Do not normalize (i.e. uppercase) statement GUIDs in our output and continue retrieving the statement by case-sensitive GUID.
  • Option 2: Continue normalizing the output and retrieve the statement by case-insensitive GUID.

Note: We need to be careful not to overwrite an existing lowercase statement GUID with an uppercase one.

Event Timeline

Initial discussions led to the conclusion that we should simply let REST API can handle statements with lowercase IDs but continue to display them with uppercase

Confirming that option 2 "Continue normalizing the output and retrieve the statement by case-insensitive GUID." is the intended direction.

After some consideration it requires some more thought so removing from the sprint.

After talking to Leszek - Reading data should work with a redirect (similar to how Action API does it afaik). For modifying/deleting we should have a message that lets them know what the “correct” statement to modify/delete is