Wikidata-tech August 2022
----- 2023 ----- February 2023 January 2023 ----- 2022 ----- December 2022 November 2022 October 2022 September 2022 August 2022 July 2022 June 2022 May 2022 April 2022 March 2022 February 2022 January 2022 ----- 2021 ----- December 2021 November 2021 October 2021 September 2021 August 2021 July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 ----- 2020 ----- December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 ----- 2019 ----- December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 ----- 2018 ----- December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 ----- 2017 ----- December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 ----- 2016 ----- December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 ----- 2015 ----- December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 ----- 2014 ----- December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 ----- 2013 ----- December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013
wikidata-tech@lists.wikimedia.org
You can now check out the current development state of the upcoming REST API for Wikibase
by Mohammed Sadat Abdulai
Hello everyone, We are working on making it easier to access Wikidata's data programmatically so that more people can build great applications on top of our data. As part of this we are building a new REST API for Wikibase. A while ago we asked for feedback on the draft specification for that new API <https://www.wikidata.org/wiki/Wikidata:REST_API_feedback_round> (see previous communication <https://lists.wikimedia.org/hyperkitty/list/wikidata@lists.wikimedia.org/me…> ). It is in development now. While it is not in the state which we would like to run on Wikidata, you can now have a look at the current development state on Beta Wikidata <https://wikidata.beta.wmflabs.org> and follow along as we build out the API. You can find the current state of the specification we are working from at https://doc.wikimedia.org/Wikibase/master/js/rest-api/. *(Small caveat: The specification might sometimes be slightly ahead of the code development and contain functionality that still needs to be implemented.)* Please note that the API is still in the experimental development state. There might be changes in the functionality available and API's behavior that we will not announce separately. The current state can already do the following: - Retrieve the data of an Item with 'GET /entities/items/{item_id}' and filter what fields (i.e. type, labels, descriptions, aliases, statements, sitelinks) are returned when reading the Item data - Retrieve all statements of an Item with 'GET /entities/items/{item_id}/statements' - Retrieve the data of a single statement of an Item with 'GET /entities/items/{item_id}/statements/{statement_id}' or 'GET /statements/{statement_id}' - Conditionally request the data only if it has changed since the specified revision/timestamp (using If-None-Match, If-Modified-Since HTTP headers) - Create a statement on an Item with 'POST /entities/items/{item_id}/statements' - Authenticate and authorize as a Beta Wikidata user when making edits using the API, as well as provide edit tags and edit comment, and mark an edit as one made by a bot. If you want to give it a try, here are some REST API calls for an example Item ("house cat") on Beta Wikidata: - Get the complete data of the Item: GET https://wikidata.beta.wmflabs.org/w/rest.php/wikibase/v0/entities/items/Q59… - Get all labels: GET https://wikidata.beta.wmflabs.org/w/rest.php/wikibase/v0/entities/items/Q59… - Get a specific statement by its ID: GET https://wikidata.beta.wmflabs.org/w/rest.php/wikibase/v0/entities/items/Q59… - Get all statements: GET https://wikidata.beta.wmflabs.org/w/rest.php/wikibase/v0/entities/items/Q59… The following things are still missing before it can go live on Wikidata in a first version: - Replacing the statement on an Item with 'PUT /entities/items/{item_id}/statements/{statement_id}' or 'PUT /statements/{statement_id}' - Editing a statement on an Item with 'PATCH /entities/items/{item_id}/statements/{statement_id}' or 'PATCH /statements/{statement_id}' - Removing the statement from an Item with 'DELETE /entities/items/{item_id}/statements/{statement_id}' or 'DELETE /statements/{statement_id}' - Automated edit summaries The following will likely not be available in the first version but follow later: - Creating or deleting an Item - Getting a statement from an Item based on the Property ID in the statement - Any operation (reading, adding, editing, removing) on sitelinks, labels, descriptions and aliases - Any operation on entity types other than Items (i.e. Properties, Lexemes, …) - Translated error messages If you have any feedback on what's there so far please let us know at Wikidata talk:REST API feedback round <https://www.wikidata.org/wiki/Wikidata_talk:REST_API_feedback_round>. Cheers, -- Mohammed Sadat *Community Communications Manager for Wikidata/Wikibase* Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin Phone: +49 (0) 30 577 116 2466 https://wikimedia.de Keep up to date! Current news and exciting stories about Wikimedia, Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now <https://www.wikimedia.de/newsletter/>. Imagine a world in which every single human being can freely share in the sum of all knowledge. Help us to achieve our vision! https://spenden.wikimedia.de Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207.