Page MenuHomePhabricator

API for reading and writing EntitySchemas
Open, MediumPublic


As a tool builder I want to read and edit Entity Schemas via an API in order to make use of them in my tools.

Right now no proper API for Entity Schemas exists that would allow tool builders to interact with them. All that is available is Special:EntitySchemaText, which returns the Schema but for example not the label, description and aliases for the Schema.

We should have an API that lets tool builders read and write Entity Schemas.


Acceptance criteria:

  • an API exists for reading and writing Entity Schemas. It includes reading and writing for all Entity Schema content (schema, labels, descriptions, aliases)

Open questions:

  • This should probably be part of the Wikibase REST API or something close to it?

Event Timeline

@Lucas_Werkmeister_WMDE I could not find docs the other day. Can you clarify if they are just missing or if no API exists? (Depending on which it is I would then open other tickets.)

Special:EntitySchemaText exists (example), and you can get the whole page content (in an internal, undocumented format) via the action API; apart from that, there’s no API for entity schemas as far as I’m aware.

Thanks for the response.

We´d like to make use of that feature in YASHE in order to create and edit EntitySchemas from there.

Are you planning to implement it?

EBernhardson subscribed.

Removing ApiFeatureUsage, that project is specifically about recording information about requests made to api.php in mediawiki

Lydia_Pintscher renamed this task from EntitySchemas API Question to API for reading and writing EntitySchemas.Dec 6 2022, 5:21 PM
Lydia_Pintscher triaged this task as Medium priority.
Lydia_Pintscher updated the task description. (Show Details)