PHPackages                             icodr8/contao-restful-webservices - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. icodr8/contao-restful-webservices

Abandoned → [craffft/contao-restful-webservices](/?search=craffft%2Fcontao-restful-webservices)ArchivedContao-module[HTTP &amp; Networking](/categories/http)

icodr8/contao-restful-webservices
=================================

RESTful Webservices for Contao OpenSource CMS

2.1.0(11y ago)652[1 issues](https://github.com/Craffft/contao-restful-webservices/issues)LGPL-3.0+PHPPHP &gt;=5.3.2

Since Feb 16Pushed 11y ago3 watchersCompare

[ Source](https://github.com/Craffft/contao-restful-webservices)[ Packagist](https://packagist.org/packages/icodr8/contao-restful-webservices)[ Docs](http://craffft.de)[ RSS](/packages/icodr8-contao-restful-webservices/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (6)Used By (0)

RESTful Webservices for Contao
==============================

[](#restful-webservices-for-contao)

The "RESTful Webservices" extension is a helper library for developers to realize RESTful webservices in your own extension

License
-------

[](#license)

This Contao extension is licensed under the terms of the LGPLv3.

Dependencies
------------

[](#dependencies)

- Haste

Links
-----

[](#links)

Documentation
-------------

[](#documentation)

Define the webservice "categories"

```
// systems/modules/mymodule/config/config.php

$GLOBALS['RESTFUL_WEBSERVICES']['ROUTING']['categories'] = array
(
    // Define the webservice location (required definition)
    // Callable via http://localhost/mycontao/interface/categories/12/my_token
    'pattern' => '/categories/{id}/{token}',

    // Restrict methods (optional definition)
    // You can use GET, PUT, POST and DELETE
    'methods' => array('GET', 'POST'),

    // Set requirements for the pattern values (optional definition)
    'requirements' => array
    (
        'id' => '\d+',
    ),

    // Restrict access by tokens (optional definition)
    'tokens' => array
    (
        'my_token',
    ),

    // Restrict access by ip addresses (optional definition)
    'ips' => array
    (
        '127.0.0.1',
    ),

    // Restrict CORS access by ip addresses (optional definition)
    'cors' => array
    (
        '192.168.1.180',
    )
);
```

Declare the webservice class "WebserviceCategories"

```
// systems/modules/mymodule/webservices/WebserviceCategories.php

namespace MyAppNamespace;

use \Haste\Http\Response\JsonResponse;

class WebserviceCategories extends \RESTfulWebservices\RESTfulController
{
    public function get()
    {
        $arrData = array();

        // Add "Hello World!" to the json output
        $arrData['status'] = 'Hello World!';

        // Send response
        $objResponse = new JsonResponse();
        $objResponse->setContent($arrData, JSON_PRETTY_PRINT);
        $objResponse->send();
    }

    public function put()
    {
        // Code for PUT requests
    }

    public function post()
    {
        // Code for POST requests
    }

    public function delete()
    {
        // Code for DELETE requests
    }
}
```

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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

Total

4

Last Release

4047d ago

Major Versions

1.0.1 → 2.0.02014-03-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bb19a9412cab30e88d3c7c95b054d0b05c4497ac759d2bd4a3f137139437a13?d=identicon)[Craffft](/maintainers/Craffft)

---

Tags

restdatainterfacecontaowebservice

### Embed Badge

![Health badge](/badges/icodr8-contao-restful-webservices/health.svg)

```
[![Health](https://phpackages.com/badges/icodr8-contao-restful-webservices/health.svg)](https://phpackages.com/packages/icodr8-contao-restful-webservices)
```

###  Alternatives

[cundd/rest

REST API for TYPO3 CMS

77118.8k1](/packages/cundd-rest)[guanguans/laravel-api-response

Normalize and standardize Laravel API response data structure. - 规范化和标准化 Laravel API 响应数据结构。

475.6k](/packages/guanguans-laravel-api-response)[bilyiv/request-data-bundle

Represents request data in a structured and useful way.

212.6k](/packages/bilyiv-request-data-bundle)[megaads/apify

A pretty library to help developers build RESTful APIs lightly, quickly and properly even without writing code

151.7k](/packages/megaads-apify)

PHPackages © 2026

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