Page MenuHomePhabricator

[EPIC] Article description editing API
Closed, DeclinedPublic1 Estimated Story Points


User Story
As a client developer, I want a unified API for editing article title descriptions that abstracts away the complexity of the underlying description sources

For every Wikipedia except English Wikipedia, the article description included in the page summary is from Wikidata. For English Wikipedia, as described in T256817, it now must come from the short description template in the article. It'd be ideal to have a single API for editing this title description that handles the underlying complexity of either editing Wikidata or English Wikipedia.

Rough Spec
No strong preference . The client should be able to make an authenticated request with the description text as a parameter and have the short description updated or created in the article itself.

Open questions
Should wikitext be supported?
Should it be a MediaWiki REST API, an action API, or something else?

Rough implementation plan
On enwiki, the API would edit the {{short description}} or {{SHORTDESC}} template in the article's wikitext. If the template doesn't exist in the wikitext, it should be added with the value provided.

On all other wikis, edit the Wikidata description for the entity associated with the article by using action=wbsetdescription.

The edits would be made as if the user who made the authenticated request had made the underlying edits directly.

Event Timeline

If a new PHP API is created for this (seems nicer to me than trying to handle POST in the summary API), is there any advantage to making it an action API instead of a REST one? Integrating things with the action API's query action has a number of benefit, but for a write API, it seems like equal effort with a less testing-friendly and less client-developer-friendly result.

@Tgr good point - If we go the PHP route, I don't think it needs to be an action API instead of a REST API. I'll update the description to clarify.

eprodromou added a subscriber: eprodromou.

This seems really interesting for us, and a good addition to the work on description updates. I'll be evaluating further.

Naike set the point value for this task to 1.Sep 11 2020, 10:54 AM

We've been using T259617 to track this process, so I'm going to close this ticket in favour of that one.