Download the PHP package mwstake/mediawiki-component-commonwebapis without Composer
On this page you can find all versions of the php package mwstake/mediawiki-component-commonwebapis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mwstake/mediawiki-component-commonwebapis
More information about mwstake/mediawiki-component-commonwebapis
Files in mwstake/mediawiki-component-commonwebapis
Package mediawiki-component-commonwebapis
Short Description Provides various web APIs (Action API and REST)
License GPL-3.0-only
Informations about the package mediawiki-component-commonwebapis
MediaWiki Stakeholders Group - Components
Common Web APIs for MediaWiki
Provides various web APIs (Action API and REST).
This code is meant to be executed within the MediaWiki application context. No standalone usage is intended.
Compatibility
2.0.x
-> MediaWiki 1.391.0.x
-> MediaWiki 1.35
Prerequisites
Use in a MediaWiki extension
Require this component in the composer.json
of your extension:
Getting the available endpoints
will yield a list of all registered endpoints as well as their REST path configuration
Clientside abstraction
To make it easier to access these endpoints from JS, an abstraction is implemented.
To enable it, load RL module ext.mws.commonwebapis
and use it like this:
REST API
Filtering
In order to specify filters, you can use the filter
parameter. It is an JSON-encoded array of objects. Each object has the following properties:
property
- The field to filter onvalue
- The value to filter onoperator
- The operator to use for the filter. Possible values areeq
(equals),neq
(not equals),lt
(less than),lte
(less than or equal),gt
(greater than),gte
(greater than or equal),like
(like),nlike
(not like),in
(in),nin
(not in),isnull
(is null),isnotnull
(is not null),between
(between),nbetween
(not between),ilike
(case insensitive like),nilike
(case insensitive not like),regexp
(regular expression),nregexp
(not regular expression). Depending on the type of the filter, some operators might not be available.type
- The type of the value. Possible values arestring
,integer
,float
,boolean
,list
Sorting
In order to specify sorting, you can use the sort
parameter. It is an JSON-encoded array of objects. Each object has the following properties:
property
- The field to sort ondirection
- The direction to sort. Possible values areasc
(ascending) anddesc
(descending)
Example
All versions of mediawiki-component-commonwebapis with dependencies
mwstake/mediawiki-component-datastore Version ~1
mwstake/mediawiki-component-utils Version ~2