API module "smwbrowse"

From semantic-mediawiki.org
smwbrowse
Allows to search for properties, categories and concepts
Keywords
API · API module · ask query · action smwbrowse · smwbrowse
Further Information
Provided by: Semantic MediaWiki
Added: 3.0.0
Removed: still available

The "smwbrowse" API module supports the search for pages, properties, categories and concepts via action "smwbrowse" (?action=smwbrowse) against Semantic MediaWiki using the MediaWiki API and get results back serialized in one of the supported formats. This module is similar to API-module "browsebyproperty"Allows to fetch information about a property or a list of properties. It was introduced with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..1234

The module supports two submodules:

  1. "browse": The object to be searched, either "page", "property", "pvalue", "category" or "concept"
  2. "params": The query parameters provided in json-format
    • primary selectors: "limit", "offset", "search" and "property" (the latter only available if "pvalue" was chosen as the value for the "browse" parameter)
    • special selectors: "description" "prefLabel" and "usageCount" (available if "property" was chosen as the value for the "browse" parameter)
Returned results are by default cached for one hour. This time span may be adapted via the "api.browse" or "api.browse.pvalue" option respectively to configuration parameter $smwgCacheUsageSets how the caching behaviour or special pages related to Semantic MediaWiki is controlled.

Examples[edit]

page information
../api.php?action=smwbrowse&browse=page&params={ "limit": 10, "offset": 0, "search": "Main", "fullText": true, "fullURL": true }
property information
../api.php?action=smwbrowse&browse=property&params={ "limit": 10, "offset": 0, "search": "Date", "description": true, "prefLabel": true, "usageCount": true }
property values
../api.php?action=smwbrowse&browse=pvalue&params={ "limit": 10, "offset": 0, "property" : "Foo", "search": "tex" }
category information
../api.php?action=smwbrowse&browse=category&params={ "limit": 10, "offset": 0, "search": "Date" }
concept information
../api.php?action=smwbrowse&browse=concept&params={ "limit": 10, "offset": 0, "search": "Date" }


References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2696
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:2721
  3. ^  Semantic MediaWiki: GitHub pull request gh:smw:3129
  4. ^  Semantic MediaWiki: GitHub pull request gh:smw:3445