PHPackages                             sbronsted/librest - 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. sbronsted/librest

ActiveLibrary[API Development](/categories/api)

sbronsted/librest
=================

A resource based rest api

v4.1.1(6y ago)0248MITPHPPHP &gt;=7.1

Since Apr 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sorenbronsted/librest)[ Packagist](https://packagist.org/packages/sbronsted/librest)[ Docs](https://github.com/sorenbronsted/librest)[ RSS](/packages/sbronsted-librest/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

\#librest

This library handle rest http requests and the url is interpret as a resource request. By resource is meant a domain object model, where those classes one wants to expose must implement RestEnable.

The url schema is like this:

```
/rest/ClassName[/uid|a_static_method|/uid/a_method][?property=value&...]

```

**Examples:**

GET /rest/Person will return all person objects

GET /rest/Person/1 will return a person object with id 1

GET /rest/Person/pets will call the static method 'pets' on the class Person and return the output

GET /rest/Person/1/cats will call the method on the person object with uid == 1 and return the output

GET /rest/Person?name=foo will return all persons object which have a the name 'foo'

GET /rest/Person/pets?name=xx will call the static method 'pets' on class Person with arguments 'xx' and return the output

DELETE /rest/Person will delete all person objects

DELETE /rest/Person/1 will delete

POST /rest/Person/pets?property=name,.. will set all the properties and call static function on Person.

POST /rest/Person/1?property=name,.. will set all the properties and call save on the person object with id 1

**Configuration:**

If DiContainer object is configured with an object named restAuthenticator, so the rest call will authenticated before executionen.

Typical you can check $\_SERVER\['REQUEST\_URI'\] in your index.php, and if it starts with /rest/ then call: echo Rest::run($\_SERVER, $\_REQUEST);

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~275 days

Recently: every ~332 days

Total

6

Last Release

2354d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2462997?v=4)[Søren Brønsted](/maintainers/sorenbronsted)[@sorenbronsted](https://github.com/sorenbronsted)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sbronsted-librest/health.svg)

```
[![Health](https://phpackages.com/badges/sbronsted-librest/health.svg)](https://phpackages.com/packages/sbronsted-librest)
```

###  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)
