Extension:SemanticRESTAPI
Appearance
From mediawiki.org
Revision as of 09:37, 28 October 2025 by ~2025-30337-37 (talk | contribs) (Added a see also on https://www.mediawiki.org/wiki/Extension:SemanticAPI)
Release status: stable |
|
|---|---|
| Implementation | API |
| Description | Get data from Semantic MediaWiki through the REST API |
| Author(s) | Sophivorus talk |
| 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] |
| 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
SemanticRESTAPIfolder to yourextensions/directory.
Developers and code contributors should install the extension from Git instead, using:cdextensions/ gitclonehttps://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
[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:SemanticAPI - Another extension to add REST for semantic data - with GET/PUT/DELETE capabilities
- Extension:Semantic Extra Special Properties - Add several standard semantic properties to every page