The Location header should point to the URL of the item specific single statement endpoint, i.e. a full URL ending in /entities/items/{item_id}/statements/{statement_id}.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Ifrahkhanyaree_WMDE | T344228 Functionality for REST API v1 | |||
Resolved | WMDE-leszek | T306667 🟩️ Create a statement on an item via POST /entities/items/{item_id}/statements | |||
Resolved | Silvan_WMDE | T309853 🟩️ Generate location header from response |
Event Timeline
Change 806169 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):
[mediawiki/extensions/Wikibase@master] REST: Add Location header to POST response
Change 806169 abandoned by Silvan Heintze:
[mediawiki/extensions/Wikibase@master] REST: Add Location header to POST response
Reason:
see I5fc99f1da8ec33adf26757e2d73a82640ca72cda
Change 806199 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):
[mediawiki/extensions/Wikibase@master] REST: Add Location header to POST response
Change 806199 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] REST: Add Location header to POST response
Change 806907 had a related patch set uploaded (by Jakob; author: Jakob):
[mediawiki/extensions/Wikibase@master] REST: Test that route paths are consistent
Pls note that the Location header value holds the URL to the newly created statement in url-encoded format, which means the statement guid Q42$... becomes Q42%24..., which isn't very pretty. @WMDE-leszek Should this be changed or do you agree that tools and gadgets won't actually care much about Location header URL's prettiness?
Change 806907 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] REST: Test that route paths are consistent
It is my understanding it is still perfect valid URL/URI, and therefore is okay to serve to clients.
The prettiness dimension is subjective and not relevant here.
Thank you.