Page MenuHomePhabricator

API query=tags filtering
Open, Needs TriagePublic


It'd be really useful if you could filter the lists of tags... Name, active, source.. Defined maybe?

Event Timeline

Reedy created this task.Jan 16 2018, 11:59 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 16 2018, 11:59 PM

Name would be the useful one here for me... "Is this tag set up in this wiki?"

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Jan 17 2018, 2:34 PM

For each tag, getting all of the properties (|description|hitcount|defined|source|active&tglimit=max ) returns

  1. A "name" for the tag
  2. A "displayname" for the tag
  3. A "description" for the tag
  4. A "hitcount" for the tag

As far as I can tell, if the tag is still active, it also returns an empty defined and active fields, as well as a source that is an array of (currently) either extension, manual, or both. If the tag is inactive, the source array is empty, and the defined and active fields are omitted

The easiest filter would likely be requiring that the filter be active (or inactive). An implementation similar to action=query&list=watchlist&wlshow=, with a new optional parameter to the API beng added (eg tgshow) Thoughts?