Last modified: 2014-09-17 21:43:48 UTC
maintenance/interwiki.sql does not contain data for the iw_api column. Therefore, Interwiki::getAPI will always return null. I could write a script which populates the api endpoint data using the "EditURI" "really simple discovery" data, if we plan to implement the api column. Since we still have a blank slate here, it might be more useful to store the script URL prefix, for example "http://de.wikibooks.org/w/", at least until there is an API to retrieve the other endpoints through queries to api.php.
(Previous discussion was on change I89668fca.)
The column already has a defined purpose. Whether or not it's filled out by default or entries on WMF. -1 To changing the purpose. There's also this RFC to think about. As the mid/long-term plan is to eventually replace interwiki completely: https://www.mediawiki.org/wiki/Requests_for_comment/New_sites_system
Agreed with Daniel. Can't we just implement the column with its defined purpose? What would need to be done for this?
To finish implementing ::getAPI, we just have to populate the iw_api column and add the data to maintenance/interwiki.sql. I'll go ahead and write a script to do that! I'm definitely not suggesting we reuse the iw_api column and fill it with incorrect stuff :p, so I'm tabling the second idea I brought up in order to reduce confusion.
interwiki.sql/list needs to be overhauled, see bug 58369 and others. This seems like a MediaWiki issue, so I'm moving it accordingly. Fixing this on the WMF cluster would be a separate bug, requiring modification of the format of [[m:Interwiki map]] among other things.
Change 161034 had a related patch set uploaded by Alex Monk: Fill the iw_api column of the interwiki table when installing https://gerrit.wikimedia.org/r/161034