Page MenuHomePhabricator

List backlinks of items
Open, Needs TriagePublicFeature

Description

Feature summary

One thing that isn't possible from the REST API that I would personally find useful is backlinks.

In particular I would optimally like to know the property and QID/PID of the item/property that is linking to some item.

Use case(s)

  • Before deleting an item admins should check if there are any backlinks. Items with existing backlinks shouldn't be deleted.
  • If you want to use the API to meaningfully use the information in Wikidata it is sometimes necessary to look at backlinks. For example an item might only tell you that it's a "human" but if you check the backlinks you will see that that item is listed as the author of a bunch of books and from this we can conclude that the human is an author.

Benefits

  • would enable tools to do more advanced things with wikibase

Potential cons

Possible con is that this could be really expensive for highly linked items.

Possible reasonable alternative is to ask people to just use SPARQL. I imagine this query would be cheaper/faster than hitting SPARQL? But if not then maybe this request can be closed.

Event Timeline

Thank you for this, I'll add this to the REST API backlog but I'm unsure when we'll be able to pick it up. The goal for the moment is to focus on providing the foundational endpoints until the summer