Accueil Features Demos Download Installation User Manual Developer Manual Relation function Credits

Connecter

inc/special/rest.php

Used by Special:Rest.

Shows the configuration of the REST API. It shows the access point and all exposed fields that were configured in the Rest namespace and handles the REST API request itself.

The access point is https://www.example.com/rest/api

By default, the following requests are active

  • /pages
  • /images
  • /images/{id}/{version}

A request configuration is a list of fields. For example, the configutation for /images/{id}/{version} is

[[id::/images/{id}/{version}]]
[[namespace::main]]
[[operationid::/images/.+?/.+]]
[[description::Resized version of image]]
[[parameters' => 'id::version]]
[[parameterdescriptions::Filename of image::version string w|w-h|w-h-crop]]
[[parameterexamples::minette.jpg::240-160-auto]]
[[code::set parameters = replace(path,"/images/","")
set id = regexreplace(parameters,"/.+$","")
set path = regexreplace(parameters,"^.+/","")
filter _namespace "image", _name id
select _name == "Image:".id
update _name = replace(_name, "Image:","")
extend p = path')]]

File structure inc folder inc/special folder