I'm trying to fetch all pages with a specific content model (js/css) via MediaWiki API. I searched the docs but couldn't find an endpoint accepting that metadata. Is that possible at all?
Thanks in advance!
I'm trying to fetch all pages with a specific content model (js/css) via MediaWiki API. I searched the docs but couldn't find an endpoint accepting that metadata. Is that possible at all?
Thanks in advance!
It looks like even the info prop doesn't return the content model of a page, however, it is still possible with a workaround. You will have to query the logs using the logevents list instead for content model changes/creations, and go through the list and keep track of the ones that have js/css as their latest. An example of the query parameters needed:
{
"action": "query",
"format": "json",
"list": "logevents",
"leprop": "title|details",
"letype": "contentmodel",
"ledir": "newer"
}