API module "compoundquery"

From semantic-mediawiki.org
Jump to: navigation, search
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 the Semantic Compound Queries extension and was introduced with it's version 1.0.0. It acts analogous to the "Ask" API module provided by Semantic MediaWiki.

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

/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