Page MenuHomePhabricator

Add API endpoint URL link somewhere in the pages
Closed, ResolvedPublic

Description

The diff explains the problem. Another page in the docs says "ask the wiki owner": seriously?
The endpoint URL must be added in some place where you'll be able to find it even if you don't know the script path or the index.php URL. It should be very easy to put it in a comment somewhere in [[Special:Version]], for instance.
Note that of course if you know the API endpoint you can get the index.php URL via the API itself.


Version: unspecified
Severity: enhancement
URL: https://www.mediawiki.org/w/index.php?title=API%3AMain_page&action=historysubmit&diff=519568&oldid=518663

Details

Reference
bz35685

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:19 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz35685.
bzimport added a subscriber: Unknown Object (MLST).
Nemo_bis created this task.Apr 3 2012, 11:59 PM
Reedy added a comment.Apr 4 2012, 12:01 AM

We have RSD discovery for the api, so in the source it is:

<link rel="EditURI" type="application/rsd+xml" href="http://192.168.0.190/w/api.php?action=rsd" />

Which then has the content:

<?xml version="1.0"?><rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd"><service><apis><api name="MediaWiki" preferred="true" apiLink="http://192.168.0.190/w/api.php" blogID=""><settings><docs xml:space="preserve">https://www.mediawiki.org/wiki/API</docs><setting name="OAuth" xml:space="preserve">false</setting></settings></api></apis><engineName xml:space="preserve">MediaWiki</engineName><engineLink xml:space="preserve">https://www.mediawiki.org/</engineLink><homePageLink xml:space="preserve">http://192.168.0.190/wiki/Main_Page</homePageLink></service></rsd>

I guess this is enough.
I must have been unlucky with the wikis I looked into (they didn't have it): when was it added? I'll add the info to the docs.

Reedy added a comment.Apr 4 2012, 12:19 AM

(In reply to comment #2)

I guess this is enough.
I must have been unlucky with the wikis I looked into (they didn't have it):
when was it added? I'll add the info to the docs.

r75621

So should be in 1.17 onwards

I could see reason to put this somewhere more user visible too

(In reply to comment #3)

I could see reason to put this somewhere more user visible too

Agreed. I'll write a patch adding a link to Special:Version

I don't think those paths are appropiate to be listed in Special:Version

They are just configuration settings. It's fine to expose them in the API, but not in Special:Version, at least not by default.