PHPackages                             mwstake/mediawiki-component-commonwebapis - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mwstake/mediawiki-component-commonwebapis

ActiveLibrary[API Development](/categories/api)

mwstake/mediawiki-component-commonwebapis
=========================================

Provides various web APIs (Action API and REST)

4.0.5(2w ago)036.1k—3.1%3[3 issues](https://github.com/hallowelt/mwstake-mediawiki-component-commonwebapis/issues)[2 PRs](https://github.com/hallowelt/mwstake-mediawiki-component-commonwebapis/pulls)GPL-3.0-onlyPHPCI passing

Since Oct 12Pushed 1w ago5 watchersCompare

[ Source](https://github.com/hallowelt/mwstake-mediawiki-component-commonwebapis)[ Packagist](https://packagist.org/packages/mwstake/mediawiki-component-commonwebapis)[ RSS](/packages/mwstake-mediawiki-component-commonwebapis/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (40)Versions (130)Used By (0)

MediaWiki Stakeholders Group - Components
-----------------------------------------

[](#mediawiki-stakeholders-group---components)

Common Web APIs for MediaWiki
=============================

[](#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
-------------

[](#compatibility)

- `3.0.x` -&gt; MediaWiki 1.43
- `2.0.x` -&gt; MediaWiki 1.39
- `1.0.x` -&gt; MediaWiki 1.35

Prerequisites
-------------

[](#prerequisites)

Use in a MediaWiki extension
----------------------------

[](#use-in-a-mediawiki-extension)

Require this component in the `composer.json` of your extension:

```
{
	"require": {
		"mwstake/mediawiki-component-commonwebapis": "~3"
	}
}
```

Getting the available endpoints
-------------------------------

[](#getting-the-available-endpoints)

```
$endpoints = MediaWikiServices::getInstance()->getService( 'MWStakeCommonWebAPIs' )->getAvailableEndpoints();
```

will yield a list of all registered endpoints as well as their REST path configuration

Clientside abstraction
----------------------

[](#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:

```
mw.loader.using( 'ext.mws.commonwebapis' ).then( function () {
	mws.commonwebapi.user.query( {
		query: 'MyUser'
	} );
} );
```

REST API
--------

[](#rest-api)

### Filtering

[](#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 on
- `value` - The value to filter on
- `operator` - The operator to use for the filter. Possible values are `eq` (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 are `string`, `integer`, `float`, `boolean`, `list`

### Sorting

[](#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 on
- `direction` - The direction to sort. Possible values are `asc` (ascending) and `desc` (descending)

### Example

[](#example)

```
mw.loader.using( 'ext.mws.commonwebapis' ).then( function () {
	mws.commonwebapi.user.query( {
		filter: JSON.stringify( [
			{
				field: 'user_name',
				value: 'MyUser',
				operator: 'eq',
				type: 'string'
			}
		] ),
		sort: JSON.stringify( [
			{
				field: 'user_name',
				direction: 'asc'
			}
		] )
	} );
} );
```

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance97

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

113

Last Release

17d ago

Major Versions

2.0.31 → 3.0.02024-12-07

2.0.32 → 3.0.172025-06-06

2.0.33 → 3.0.202025-07-02

2.0.34 → 3.1.142026-04-09

2.0.35 → 4.0.02026-05-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/e39dfe9d3120de240053c4283e905254e8774d3278da25ad79974a8742c55192?d=identicon)[osnard](/maintainers/osnard)

![](https://www.gravatar.com/avatar/161c38b5448b71865cf0652b6974ed489dd3683b5d6e1814973cea6cb66c8f1d?d=identicon)[dsavuljesku](/maintainers/dsavuljesku)

---

Top Contributors

[![it-spiderman](https://avatars.githubusercontent.com/u/13665198?v=4)](https://github.com/it-spiderman "it-spiderman (76 commits)")[![HamishSlater](https://avatars.githubusercontent.com/u/26261210?v=4)](https://github.com/HamishSlater "HamishSlater (47 commits)")[![osnard](https://avatars.githubusercontent.com/u/1201528?v=4)](https://github.com/osnard "osnard (47 commits)")[![miriamschlindwein](https://avatars.githubusercontent.com/u/13835398?v=4)](https://github.com/miriamschlindwein "miriamschlindwein (30 commits)")[![huaj1ng](https://avatars.githubusercontent.com/u/75751972?v=4)](https://github.com/huaj1ng "huaj1ng (7 commits)")[![paladox](https://avatars.githubusercontent.com/u/5727000?v=4)](https://github.com/paladox "paladox (4 commits)")[![danielriedmueller](https://avatars.githubusercontent.com/u/5981468?v=4)](https://github.com/danielriedmueller "danielriedmueller (2 commits)")

### Embed Badge

![Health badge](/badges/mwstake-mediawiki-component-commonwebapis/health.svg)

```
[![Health](https://phpackages.com/badges/mwstake-mediawiki-component-commonwebapis/health.svg)](https://phpackages.com/packages/mwstake-mediawiki-component-commonwebapis)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
