Page MenuHomePhabricator

Wikidata Mediawiki API does not return any information on Entity Schema labels
Open, Needs TriagePublic

Description

Currently, it's not possible to obtain any information on Entity schema labels from Mediawiki API. So it's difficult to create templates for Entity schemas.
Take for example https://www.wikidata.org/w/api.php?action=query&prop=pageterms&titles=EntitySchema:E10 doesn't give any labels, descriptions, whereas

https://www.wikidata.org/w/api.php?action=query&prop=pageterms&titles=Property:P856 and https://www.wikidata.org/w/api.php?action=query&prop=pageterms&titles=Q1 give labels, aliases and description in the default language.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore added a subscriber: Addshore.

EntitySchemas were not developed closely to the entity way of doing things, thus none of the generic mechanisms that can be used on entities can be used on entity schema objects.
I guess any new request here would be a new feature request.

If you want some sort of structured access to the data, perhaps https://www.wikidata.org/wiki/EntitySchema:E10?action=raw would suite your needs.
Although I wouldn't call this a totally supported method of refined data retrieval...
But, if you always check the schema version there you shouldn't have too many problems.

Thanks @Addshore for your reply. This structured information from the above link (action=raw) is quite useful. However, it will be still interesting to have a generic mechanism to obtain information about EntitySchema.
There's no easy way to obtain any infomation about EntitySchema https://www.wikidata.org/w/api.php?action=wbsearchentities&search=EntitySchema&language=en&limit=50 returns 1 result because E1 is present as a value in that item. Same is the case with Wikidata search interface and Wikidata Query service.

With OpenSearch module: https://www.wikidata.org/w/api.php?action=opensearch&search=EntitySchema&namespace=* (3 results, but not even one EntitySchema)

Those sound like search integration points.
Poking Lydia to see where this sits on the roadmap / with other priorities.
This comes back to the same point of entity schemas are not entities so they are not really hooked into all of the same places, such as wbsearchentities again by default.