Page MenuHomePhabricator

Add more prominent "single page" link to api.php
Open, LowestPublic

Description

Okay, so occasionally I need to look up a MediaWiki message key. I go to api.php (e.g., https://meta.wikimedia.org/w/api.php) and allmessages is no longer there. There used to be a link directly to allmessages. :-(

I don't think if I ask for an allmessages link back that it'll happen, but I also think that discovery of query submodules (e.g., list=allmessages or list=allcategories) isn't great. I don't think users will know to look under a generic term like "query" to find this information and that seems like a real workflow issue that we should explore.

One idea I had was making the single page option more prominent. Currently you need to scroll down the page to find the "single page" option. You can try searching the page text for it, but every time I do, I expect "single page" and I've forgotten that it's listed as "all help in one page". So I try a quick text search, fail, and then scroll down the page and I click https://meta.wikimedia.org/w/api.php?action=help&recursivesubmodules=1, and then search for "allmessages" on the page before finally reaching https://meta.wikimedia.org/w/api.php?action=query&meta=allmessages.

Can we add a more prominent "single page" link to api.php? For example: "This is an auto-generated MediaWiki API documentation page." --> "This is an auto-generated MediaWiki API documentation page (view as single page)." where the parenthetical is linked to the recursivesubmodules=1 page.

Event Timeline

MZMcBride raised the priority of this task from to Needs Triage.
MZMcBride updated the task description. (Show Details)
MZMcBride changed Security from none to None.
MZMcBride subscribed.

I have to agree with the discoverability problem.

Ideally, I'd like to have a search field to navigate all of it actually, it's just too much of rarely used modules and params.

Anomie triaged this task as Lowest priority.Nov 26 2014, 4:42 PM

FYI: You can use uselang=qqx to look up a message key with index.php

I struggled just now trying to find the interwiki map. It's hiding under meta=siteinfo. I didn't even think to use the single page option, I just ended up searching the Git repo for iw_local until I found ApiQuerySiteinfo.php. :-( I did remember this time to search the query action help page, but I still failed.

Yes, navigating our API is a problem. "Single page API help" is one part of the solution. I' created a parent task T98904: Improve discoverability of MediaWiki API mentioning this and other improvements.

I added a new section to the API Faq (How do I) figure out what action or submodule to call? with links to the expanded "single page" API help and expanded query action.

I struggled just now trying to find the interwiki map.

That's always been hard to find because there are so many mentions of "interwiki". From T98904, a TOC, more descriptive lists of query submodules, and "search the API" would all help.

This link could go on the apihelp-linktrail line on pages with submodules (main, query, flow, maybe llist, props, meta query types) as a separate "show submodule help" that appends &recursivesubmodules=1.

This link could go on the apihelp-linktrail line on pages with submodules (main, query, flow, maybe llist, props, meta query types)

Not sure what you mean by "maybe llist, props, meta query types", as that's query. If you're meaning all the submodules, it's not as simple as "add &recursivesubmodules=1" since they don't actually have submodules.