Page MenuHomePhabricator

SPARQL endpoint should be discoverable using the Action API (in SiteInfo)
Open, Needs TriagePublic

Description

Since T125353: Make SPARQL endpoint discoverable using Wikibase API, the URL of the SPARQL endpoint associated to a Wikibase is exposed in SiteInfo (as wikibase-sparql).

However, that is not made available on Wikibase Cloud instances, per https://addshore-alpha.wikibase.cloud/wiki/Special:ApiSandbox#action=query&format=json&prop=info&meta=siteinfo (note the lack of wikibase-sparql)

This would made it easier to make tools work with Wikibases − in my case, for T294892: integraality for Wikibases?)

(As a tool developer, I want to find the SPARQL endpoint associated with a Wikibase, so that I can make my tool easily work with other Wikibases than Wikidata).

The setting within Wikibase extension is:

$wgWBRepoSettings['sparqlEndpoint']

hint
You can see how we trivially build this url for WikibaseManifest at https://github.com/wbstack/mediawiki/blob/main/dist-persist/wbstack/src/Settings/LocalSettings.php#L655 and this value could simply be duplicated to $wgWBRepoSettings['sparqlEndpoint']

Event Timeline

Hi @JeanFred,
The data is already available through the Wikibase Manifest, for example: https://coffeebase.wikibase.cloud/w/rest.php/wikibase-manifest/v0/manifest

We will still put this on our backlog to correct the config variable anyway.
Hopefully, the workaround is useful in the meantime.

Anton.Kokh renamed this task from SPARQL endpoint should be discoverable using Wikibase API to SPARQL endpoint should be discoverable using the Action API (in SiteInfo).Jun 4 2025, 12:37 PM
Tarrow updated the task description. (Show Details)