PHPackages                             da/api-server-bundle - 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. da/api-server-bundle

ActiveSymfony-bundle[API Development](/categories/api)

da/api-server-bundle
====================

DaApiServerBundle is a Symfony2's bundle allowing to provide a REST API in a simple and secure way

v1.0.3(6y ago)384.3kMITPHP &gt;=5.3.3

Since Jun 25Compare

[ Source](https://github.com/Gnuckorg/DaApiServerBundle)[ Packagist](https://packagist.org/packages/da/api-server-bundle)[ Docs](https://github.com/Gnuckorg/DaApiServerBundle)[ RSS](/packages/da-api-server-bundle/feed)WikiDiscussions Synced today

READMEChangelog (2)Dependencies (7)Versions (6)Used By (0)

DaApiServerBundle
=================

[](#daapiserverbundle)

DaApiServerBundle is a Symfony2's bundle allowing to provide a REST API in a simple and secure way.

Installation
------------

[](#installation)

Installation is a quick 2 steps process.

### Step 1: Add in composer

[](#step-1-add-in-composer)

Add the bundle in the composer.json file:

```
// composer.json

"require": {
    // ...
    "da/auth-common-bundle": "dev-master",
    "da/api-server-bundle": "dev-master"
},

```

And update your vendors:

```
composer update      # WIN
composer.phar update # LINUX

```

### Step 2: Declare in the kernel

[](#step-2-declare-in-the-kernel)

Declare the bundle in your kernel:

```
// app/AppKernel.php

$bundles = array(
    // ...
    new Da\AuthCommonBundle\DaAuthCommonBundle(),
    new Da\ApiServerBundle\DaApiServerBundle(),
);

```

Check the client API key
------------------------

[](#check-the-client-api-key)

If you want to check the API token of a client of your API for a route pattern, you must specify it in your security.yml:

```
# app/config/security.yml
security:
    firewalls:
    	#...

        api:
            pattern:   ^/api
            da_api:    true
            stateless: true

```

The URLs under `/api` will authenticate a client of your API with the API token send with the request. For the time being, the API token must be send in the HTTP header "X-API-Security-Token".

Check a given oauth token
-------------------------

[](#check-a-given-oauth-token)

If you want to check an oauth token given in the `Authorization` header of the request (Bearer token), you can specify it like this:

```
# app/config/security.yml
security:
    firewalls:
        #...

        api_user:
            pattern:   ^/api/user
            da_oauth:  true
            stateless: true

```

Remote checking
---------------

[](#remote-checking)

If your API is not at the same place as your SSO server (with oauth, ...), just follow these step:

Add the bundle in the composer.json file:

```
// composer.json

"require": {
    // ...
    "da/api-client-bundle": "dev-master"
},

```

And update your vendors:

```
composer update      # WIN
composer.phar update # LINUX

```

Then, set the config:

```
# app/config/config.yml

# DaApiClient Configuration
da_api_client:
    api:
        sso_user:
            endpoint_root:  %api.sso.endpoint_root%
            security_token: %api.sso.security_token%
            client:
                service: da_api_server.user_manager.http
        sso_client:
            endpoint_root:  %api.sso.endpoint_root%
            security_token: %api.sso.security_token%
            client:
                service: da_api_server.client_manager.http

# DaApiServer Configuration
da_api_server:
    user_manager: da_api_client.api.sso_user
    client_manager: da_api_client.api.sso_client

```

Finally, set the corresponding parameters:

```
# app/config/parameters.yml and app/config/parameters.yml.dist

parameters:
    # ...
    api.sso.endpoint_root: 'http://my-domain.com/api'
    api.sso.security_token: 3jgwm1izbse884cwskk00c0o4ww8kg08gsgc4o808gsssw4

```

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

[](#documentation)

This bundle have some other features that can help you to develop a REST API documented [here](https://github.com/Gnuckorg/DaApiServerBundle/blob/master/Resources/doc/index.md).

What about the API client side?
-------------------------------

[](#what-about-the-api-client-side)

Take a look at the [DaApiClientBundle](https://github.com/Gnuckorg/DaApiClientBundle)!

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community2

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

Total

5

Last Release

2237d ago

### Community

Maintainers

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

---

Tags

apisymfonybundleserverda

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/da-api-server-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/da-api-server-bundle/health.svg)](https://phpackages.com/packages/da-api-server-bundle)
```

PHPackages © 2026

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