Last modified: 2012-11-29 12:39:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40263, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38263 - API: return a list of supported wikis
API: return a list of supported wikis
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on: 40078
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 17:02 UTC by merl
Modified: 2012-11-29 12:39 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description merl 2012-07-09 17:02:12 UTC
Currently my bot has hard-coded that commonswiki, incubatorwiki and specieswiki are not supported. Please add a possibility to fetch a list of supported wikis (wikiid or domain), so that i can filter my langlinks based on this list before submitting them.

This can be implemented by a new module or by extending sitematrix.
Comment 1 jeblad 2012-07-14 01:24:15 UTC
All that have code="wiki" and are not closed, private or fishbowl. We do not support linking on alternate URLs, neither for ordinary aliases or language variants. Use the canonical form.

The sitematrix is the source for valid siteids
http://meta.wikimedia.org/w/api.php?action=sitematrix&smtype=language

You can also get the list used by individual modules by using the url
http://wikidata-test-repo.wikimedia.de/w/api.php?action=paraminfo&modules=wbgetitems

Note that the last list will contain all valid siteids, and do no distinction on which group they belong to. Sitelinks mimicking interlanguage links on Wikipedia should only come from the group identified by code="wiki"

Note especially that the following are redirected
* http://cz.wikipedia.org http://cs.wikipedia.org dbname="cswiki"
* http://dk.wikipedia.org http://da.wikipedia.org dbname="dawiki"
* http://epo.wikipedia.org http://eo.wikipedia.org dbname="eowiki"
* http://jp.wikipedia.org http://ja.wikipedia.org dbname="jawiki"
* http://minnan.wikipedia.org http://zh-min-nan.wikipedia.org dbname="zh_min_nanwiki"
* http://nan.wikipedia.org same as zh-min-nan
* http://nb.wikipedia.org http://no.wikipedia.org dbname="nowiki"
* http://zh-cfr.wikipedia.org same as zh-min-nan

For example will "nowiki" (aka "no") work while adding links, but not "nbwiki" (aka "nb"). The aliases is visible at "Special:Sitematix" as they have red links.
http://meta.wikimedia.org/wiki/Special:SiteMatrix

There could be sitelinks to additional groups, or even sites outside Wikimedia, but for now only Wikipedia is supported.

Note also that there are a small number of closed wikis
* http://aa.wikipedia.org
* http://cho.wikipedia.org
* http://ho.wikipedia.org
* http://hz.wikipedia.org
* http://ii.wikipedia.org
* http://kj.wikipedia.org
* http://kr.wikipedia.org
* http://mh.wikipedia.org
* http://mo.wikipedia.org
* http://mus.wikipedia.org
* http://ng.wikipedia.org

There could be others that should not be listed.
Comment 2 merl 2012-07-14 10:18:02 UTC
commonswiki, specieswiki and incuatorwiki langlinks are also linking to wikipedia wikis, but only unidirectional. And one day wikidata must support them. I personally think it's always better to fetch this config from api instead of heardcoding them in source code of all clients.

The paramsinfo parameter value list would solve my problem, if the result would be usable.

Fetching all open wikipedia language projects is not the problem.
Comment 3 jeblad 2012-07-14 11:35:05 UTC
The sitematrix *is* the source for the sites entered in the database table, and the database table *is* the source used for validation of sites. If something does not validates, its because its not included for the moment.

In this project there are some constraints on what can (and should) be supported for the moment, and that is interlanguage links between Wikipedia projects. Projects that have unidirectional links to wikipedia projects can use the sitelinks. Projects that wants to be included in the sitelinks must be able to provide a page that identifies the same entity as the Wikipedia pages, and must also be accepted by the community.

For now we only provide the site ids necessary to do so and leave the rest to the future community. Those that have a code="wiki" will work, other codes may work, those not included in the sitematrix (and the paramsinfo) will fail.
Comment 4 Daniel Kinzler 2012-07-26 10:58:29 UTC
Re-opening.

The list of sites returned by the API's self-documentation should be the list of sites that can actually be used with setsitelink and setitem. Since we currently only support links to Wikipedias, the list of sites should only be Wikipedias. That is, it must only return wikis in the group we actually support for linking.
Comment 5 Daniel Kinzler 2012-07-26 11:06:41 UTC
Merls said on IRC: ommonswiki and wikispecies belong to the wikipedia langlink group, dewikisource langlinks to not link to wikipedia

I guess all wikis on which langlink link to wikipedia should be in the wikipedia group, iven if they are not wikipedias. Makes sense?
Comment 6 Nikola Smolenski 2012-07-26 13:00:05 UTC
Commons and wikispecies are special in that they can read from Wikidata, but not write to Wikidata, so probably that should be addressed somehow.
Comment 7 jeblad 2012-07-26 13:02:00 UTC
Patchset for the group "SITE_GROUP_WIKIPEDIA" in https://gerrit.wikimedia.org/r/#/c/16727/
Comment 8 Daniel Kinzler 2012-07-26 15:39:50 UTC
Should be fixed in master: only wikipedia sitres are listed by the documentation, and only wikipedia sites are allowed as link targets.

Discussion about edge cases like commons and wikispecies should be taken somewhere else, it's a configuration and conceptual issue.
Comment 9 Daniel Kinzler 2012-07-26 15:40:10 UTC
Oh, I forget: https://gerrit.wikimedia.org/r/#/c/16727/
Comment 10 Daniel Kinzler 2012-09-10 12:47:53 UTC
reopening as per http://lists.wikimedia.org/pipermail/wikidata-l/2012-September/001031.html
Comment 11 Daniel Kinzler 2012-09-10 13:58:24 UTC
submitted as I4c154bc0
Comment 12 Anja Jentzsch 2012-11-29 12:39:02 UTC
Verified in Wikidata demo time for sprint 15

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links