API module "browsebysubject"

From semantic-mediawiki.org
browsebysubject
Allows to browse a subject, i.e. a page or subobject
Keywords
Further Information
Provided by: Semantic MediaWiki
Deprecated: true
Added: 1.9.0
Removed: still available
This module is deprecated1 and may be removed in a future release of Semantic MediaWiki! Please use API-module "smwbrowse"Allows to search for properties, categories and concepts instead.

The "browsebysubject" API module allows you to browse facts via action "browsebysubject" (?action=browsebysubject) against Semantic MediaWiki using the MediaWiki API and get results back serialized in one of the supported formats. This module is the equivalent to special page "Browse"Shows all properties and their values annotated to a page. It was introduced with Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x. and deprecated with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.1.

The module supports two parameters:

  1. "subject": The title of the subject (page) to be queried
  2. "subobject": The title of the subject (subobject) with the named identifier to be queried (available since Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x.)
The "subject" parameter must be set in any case.

Examples[edit]

subject
../api.php?action=browsebysubject&subject=Main_Page
run example
subject and subobject with named identifier
../api.php?action=browsebysubject&subject=Help:SMW_-_Number_of_downloads&subobject=SFS-2012-10
run example
Browsing of a subobject subject with an anonymous identifier is limited to its "parent" subject, meaning that a request for a "Foo#_ed5a9979db6609b32733eda3fb747d21" subject will produce information for "Foo" as a whole including its subobjects because MediaWikis's WebRequest (responsible for handling request data sent by a browser) will eliminate any fragments (indicated by "#") to an API consumer.

References

  1. a b  Semantic MediaWiki: GitHub pull request gh:smw:3285