PHPackages                             jpierront/api-batch-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. jpierront/api-batch-bundle

ActiveLibrary[API Development](/categories/api)

jpierront/api-batch-bundle
==========================

Api Batch Bundle

v1.0.0(10y ago)120MITPHPPHP &gt;=5.3.3CI failing

Since Sep 16Pushed 6y agoCompare

[ Source](https://github.com/jpierront/ApiBatchBundle)[ Packagist](https://packagist.org/packages/jpierront/api-batch-bundle)[ Docs](https://github.com/jpierront/ApiBatchBundle)[ RSS](/packages/jpierront-api-batch-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

JPierrontApiBatchBundle
=======================

[](#jpierrontapibatchbundle)

About
-----

[](#about)

The JPierrontApiBatchBundle allows you to send multiple JSON api call in only one http request.

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

[](#installation)

Require the `jpierront/api-batch-bundle` package in your composer.json and update your dependencies.

```
$ composer require jpierront/api-batch-bundle

```

Add the JPierrontApiBatchBundle to your application's kernel:

```
public function registerBundles()
{
    $bundles = array(
        ...
        new JPierront\ApiBatchBundle\JPierrontApiBatchBundle(),
        ...
    );
    ...
}

```

Configuration
-------------

[](#configuration)

Create a route for the batch action

YAML:

```
# app/config/routing.yml
batch:
    path:   /api/batch
    defaults:  { _controller: JPierrontApiBatchBundle:ApiBatch:apiBatch }

```

Annotation:

```
# app/config/routing.yml
batch:
    resource: AppBundle\Controller\ApiBatchController

// AppBundle\Controller\ApiBatchController.php
class ApiBatchController extends BaseApiBatchController
{
    /**
     * @Route(path="batch", name="batch")
     */
    public function getAction(Request $request)
    {
        return parent::getAction($request);
    }
}

```

Usage
-----

[](#usage)

### Request

[](#request)

Call your new batch api in POST method with JSON in request body

```
[
    {
        "method": "GET",
        "url": "/sub-api-1",
        "parameters": "queryParameter1=value1&queryParameter2=value2"
    },
    {
        "method": "POST",
        "url": "/sub-api-2",
        "parameters": "postParameter1=value1&postParameter2=value2"
    }
]

```

`method`

- Accept any HTTP method (GET, POST, PUT, PATCH, ...)
- Must be equal to the method expected by your api

`url`

- Relative url of your sub api
- Without the hostname
- Without the query parameters

`parameters`

- You GET or POST parameters formatted like query string

### Response

[](#response)

The batch api will return a JSON response

```
[
    {
        "code": 200,
        "headers": {
            "content-type": "application\/json",
        },
        "body": "Your json response of sub api 1"
    },
    {
        "code": 200,
        "headers": {
            "content-type": "application\/json",
        },
        "body": "Your json response of sub api 2"
    }
]

```

`code`

- Is the http status code of the sub api call

`headers`

- Is the headers of the sub api call

`body`

- Is the body of the sub api call

License
-------

[](#license)

Released under the MIT License, see LICENSE.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

3943d ago

### Community

Maintainers

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

---

Top Contributors

[![jpierront](https://avatars.githubusercontent.com/u/1228441?v=4)](https://github.com/jpierront "jpierront (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jpierront-api-batch-bundle/health.svg)

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

###  Alternatives

[overblog/activemq-bundle

OverBlog ActiveMQ Bundle

1042.8k](/packages/overblog-activemq-bundle)

PHPackages © 2026

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