Extension:SemanticRESTAPI

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
SemanticRESTAPI
Release status: stableCategory:Stable extensions
Implementation API Category:API extensions
Description Get data from Semantic MediaWiki through the REST API
Author(s) Sophivorustalk
Latest version 2.0 (2023-11-01)
MediaWiki 1.39+Category:Extensions with manual MediaWiki version
PHP 7+
Database changes No
License GNU General Public License 3.0 or later
Download Category:Extensions in Wikimedia version control
Example
Quarterly downloads 0
Translate the SemanticRESTAPI extension if it is available at translatewiki.net
Category:All extensionsCategory:Extensions not in ExtensionJson

The Semantic REST API extension adds an endpoint to the MediaWiki REST API that gives access to semantic data from Semantic MediaWiki.

Installation

  • Install Extension:SemanticMediaWiki
  • Download and move the extracted SemanticRESTAPI folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticRESTAPI
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'SemanticRESTAPI' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

Once installed, simply browse to the following URL pattern to get a JSON with all the semantic data of a given page:

https://www.example.com/w/rest.php/v1/page/Title_of_the_page/semantic

For example, compare this and this.

See also

Category:Semantic MediaWiki extensions
Category:API extensions Category:All extensions Category:Extensions in Wikimedia version control Category:Extensions not in ExtensionJson Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:Semantic MediaWiki extensions Category:Stable extensions