API module "BrowseBySubject"

From semantic-mediawiki.org
Jump to: navigation, search
BrowseBySubject
Allows to browse a subject, i.e. a page or subobject
Keywords
Further Information
Provided by: Semantic MediaWiki
Added: 1.9.0
Removed: still available

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". It was introduced with Semantic MediaWiki 1.9.0.

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.0)
NoteNote: The "subject" parameter must be set in any case.

Examples

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
Important noteImportant Note: 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.