API module "compoundquery"

From semantic-mediawiki.org
compoundquery
Allows to do compounded ask queries
Keywords
API · API module · ask query · action ask · ask · compound query
Further Information
Provided by: Semantic Compound Queries
Added: 1.0.0
Removed: still available

The "compoundquery" API module allows you to do compounded ask queries via action "compoundquery" (?action=compoundquery) against Semantic MediaWiki using the MediaWiki API and get results back serialized in one of the supported formats. It is provided by extension "Semantic Compound Queries"A parser function that displays multiple semantic queries at the same time and was introduced with it's version 1.0.0. It acts analogous to the "Ask" API module provided by extension "Semantic MediaWiki"Semantic MediaWiki (SMW) is a free, open-source extension to MediaWiki that lets you store and query data within the wiki's pages. Semantic MediaWiki is also a full-fledged framework, in conjunction with many spinoff extensions, that can turn a wiki into a powerful and flexible knowledge management system. All data created within SMW can easily be published via the Semantic Web, allowing other systems to use this data seamlessly..

The module supports one semantic parameter, "query" (../api.php?action=compoundquery&query=..), which takes the same string you'd feed into a #compound_query parser function, but URL-encoded.

Example[edit]

/w/api.php?action=compoundquery&query=[[Category:Stores]][[Sells%20products::%2B]];%3FHas%20country%3FCountry;%3FSells%20products%3FProducts%7C[[Category:Restaurants]][[Has%20cuisine::%2B]];%3FHas%20country%3DCountry;%3FHas%20cuisine%3DCuisine&format=jsonfm

run example