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. One of the possible object types:
    • "page"
    • "subject"
    • "property"
    • "pvalue"
    • "category"
    • "concept"
  2. "params": The query parameters to be used in JSON-format.
    • primary selectors:
      • "limit"
      • "offset"
      • "search" (allows to use * as a wildcard identifier; available since Semantic MediaWiki 3.2.0Released on 7 September 2020 and compatible with MW 1.31.0 - 1.35.x.5)
      • "property" (only available if "pvalue" was chosen as the object type for the "browse" parameter)
    • special selectors:
      • "description"
      • "prefLabel"
      • "usageCount" (only available if "property" was chosen as the object type 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 }
run example
subobject information
../api.php?action=smwbrowse&browse=subject&params={ "subject": "Examples/Subobject_identifiers_(named_vs._anonymous)", "ns" :0, "iw": "", "subobject": "_21f057b12efd9f579b1da4d2c7f14f66"
run example
property information
../api.php?action=smwbrowse&browse=property&params={ "limit": 10, "offset": 0, "search": "Date", "description": true, "prefLabel": true, "usageCount": true }
run example
property values
../api.php?action=smwbrowse&browse=pvalue&params={ "limit": 10, "offset": 0, "property" : "Located in", "search": "Germany" }
run example
category information
../api.php?action=smwbrowse&browse=category&params={ "limit": 10, "offset": 0, "search": "Date" }
run example
concept information
../api.php?action=smwbrowse&browse=concept&params={ "limit": 10, "offset": 0, "search": "Event" }
run example



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
  5. ^  Semantic MediaWiki: GitHub pull request gh:smw:4428