Template talk:API

This template stopped working on API pages. Clicking another language brings up the template itself. ??? --Yurik 01:00, 14 September 2007 (UTC)

bug when used with ApiEx-template
ApiEx (see API:Options as example) have width 100% and so they will drop below the API-navigation box and there is empty hole in the page. --Zache (talk) 19:41, 14 June 2014 (UTC)
 * I don't see that any more, they fit alongside. Looks like User:Fred Gandt fixed it in revision 1055459 in July 2014 with 'addition of "overflow:auto" to eradicate expanses of white-space.' -- SPage (WMF) (talk) 07:01, 10 August 2015 (UTC)

Navbox
With API-head being added to pages, there's now two infoboxes side-by-side, which looks terrible. This should be changed to a navbox style and moved to the bottom of the page or merged with API-head. --121.220.65.155 04:54, 22 February 2015 (UTC)
 * Yes, we need to do something, it's getting unwieldy -- SPage (WMF) (talk)

MediaWiki APIs and the PHP action API
I'm organizing content in the API: namespace, T105133. With RESTBase we have more than just, so in revision 1825996 of  I adjusted the menu to be more general but then have a heading specifically for the "PHP action API". I mentioned this name in the (reactivated) mailing list thread wikitech-l mailing list thread 'Bikeshedding a good name for "the api.php API'. -- SPage (WMF) (talk) 06:56, 10 August 2015 (UTC)

Proposal to improve this

 * 1) Add an option for , default "action" to the template:  . If type is not action, then the template will not display the horizontal "This page is part of the MediaWiki action API documentation." bar.
 * 2) * This seems really hard to do because of convoluted wiki syntax and i18n interactions. See attempt at API-navtest. It seems easier to split out the banner to API-action-banner and modify most API pages to separately invoke it as well as API.
 * 3) Add an an option for collapsed, if set the navigation sidebar is collapsed. That would allow adding the navigation to API:Web APIs hub without uglifying its experience. Maybe make it look better, the current   is a tired over-bordered lilac color,

3. a proper menu bar
What I'd really like to do is make this an actual menu bar:
 * MediaWiki APIs&#8239;▼: action API&#8239;▼ | RESTBase&#8239;▼ | Wikidata Query Service&#8239;▼

with dropdowns for each. The first "MediaWiki APIs" dropdown would have some generic pages like Etiquette and the second would have most of the current enormous navigation. The template's type parameter (general, action, RESTBase, WDQS) would bold the matching menu bar item. (For some reason, https://en.wikipedia.org/api/ is using this acid green color.)

I don't know if there's JavaScript support for such a menu bar, it might be doable in pure CSS. Eventually, T101666 "Create parser tag(s) that render OOUI PHP widgets" should help.

-- SPage (WMF) (talk) 05:41, 28 September 2015 (UTC)

Broken link - can't determine cause
Something is broken with the entry which is displaying as plain wikitext, but I can't determine what the problem is. Help? Quiddity (WMF) (talk) 06:05, 1 August 2017 (UTC)

The pipe trick foo only works when content is saved, but never when it is dynamically generated by a template. In other words wikitext can never be saved with a pipe trick unless it is escaped. The fix should probably be made in Template:Localized_link or this template, so it assigns some caption or text to the link whenever it is empty. 07:31, 1 August 2017 (UTC)

Broken link - Implementation Strategy
In the Developer Utilities section of this template, the last entry is rendered as " Special:MyLanguage/API:Implementation Strategy ". Don't see why, it's formatted same as other bulleted entries. --Xymph (talk) 15:59, 2 July 2021 (UTC)