Extension:SemanticRESTAPI
Appearance
(Redirected from Extension:Semantic REST API)
SemanticRESTAPI Release status: stable |
|
---|---|
Implementation | API |
Description | Get data from Semantic MediaWiki through the REST API |
Author(s) | Sophivorustalk |
Latest version | 2.0 (2023-11-01) |
MediaWiki | 1.39+ |
PHP | 7+ |
Database changes | No |
License | GNU General Public License 3.0 or later |
Download | |
Example | [1] |
Quarterly downloads | 0 |
Translate the SemanticRESTAPI extension if it is available at translatewiki.net | |
The Semantic REST API extension adds an endpoint to the MediaWiki REST API that gives access to semantic data from Semantic MediaWiki.
Installation
[edit]- Install Extension:SemanticMediaWiki
- Download and move the extracted
SemanticRESTAPI
folder to yourextensions/
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' );
- Done â Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
[edit]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
[edit]- Extension:SemanticMediaWiki - Store and query semantic data
- Extension:Semantic Extra Special Properties - Add several standard semantic properties to every page