PHPackages                             otezvikentiy/json-rpc-api - 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. otezvikentiy/json-rpc-api

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

otezvikentiy/json-rpc-api
=========================

Symfony Json RPC API bundle

2.12(1mo ago)32111MITPHPPHP &gt;=8.2

Since Aug 11Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/OtezVikentiy/symfony-jsonrpc-api-bundle)[ Packagist](https://packagist.org/packages/otezvikentiy/json-rpc-api)[ RSS](/packages/otezvikentiy-json-rpc-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (43)Used By (0)

OtezVikentiy Symfony Json RPC API Bundle
========================================

[](#otezvikentiy-symfony-json-rpc-api-bundle)

The bundle allows you to quickly and conveniently create JSON RPC API applications based on the Symfony framework.

---

Features
--------

[](#features)

- easy api versioning
- easy bundle installation
- compatible with attributes
- compatible with POST, GET, PUT, PATCH, DELETE requests
- fully compatible with
- swagger openapi out of the box
- preprocessors and postprocessors

github:

---

Bundle installation
-------------------

[](#bundle-installation)

[see](./docs/installation.md) how to easily install bundle.

---

Examples
--------

[](#examples)

During the installation process, we defined the `src/RPC/V1/{*Method.php}` directory in the services and marked with tags in it all the classes ending in `*Method.php` - these will be our API endpoints.

linkdescriptionfiles listcurl[see example](./docs/examples/base.md)Base easiest example.Request.php, Response.php, GetProductsMethod.php`curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0","method": "getProducts","params": {"title": "AZAZAZA"},"id": 1}' http://localhost/api/v1`[see example](./docs/examples/pre-and-post-processors.md)Example with pre- and post- processors.Request.php, Response.php, GetProductsMethod.php, AbstractMethod.php`curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0","method": "getProducts","params": {"title": "AZAZAZA"},"id": 1}' http://localhost/api/v1`[see example](./docs/examples/array_of_objects.md)Example when you need to give in response not single object, but a number of objects.Request.php, Response.php, GetProductsMethod.php, Product.php`curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0","method": "getProducts","params": {"title": "AZAZAZA"},"id": 1}' http://localhost/api/v1`[see example](./docs/examples/simple_response.md)Sometimes you may need to return from API not only a json response, but a picture or a document for example. In such a case you can use this example.Request.php, ErrorResponse.php, PlainResponse.php, GetProductsMethod.php`curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0","method": "getProducts","params": {"title": "AZAZAZA"},"id": 1}' http://localhost/api/v1`---

Swagger
-------

[](#swagger)

If you wish to generate openapi swagger yaml file - then run this command:

```
bin/console ov:swagger:generate
```

It would generate a swagger file `public/openapi/api_v1.yaml` which you can use in your swagger instance.

[see](./docs/swagger/tags.md) example of how to combine multiple endpoints with tags

[see](./docs/swagger/scalar.md) example how to define default, format and example for scalar properties of response

[see](./docs/swagger/array.md) example how to describe array properties of response

---

Security
--------

[](#security)

Initially, two implementation options are provided and tested, described below, but you are free to connect any other software solutions to your taste and color.

[Auth via lexik jwt token bundle](./docs/security/jwt_bundle.md)

[Auth via self-written system](./docs/security/self_made_token.md)

You may need to add a role model to restrict user access. You always have the option to implement your own version, but there is also a built-in implementation based on the simplest [Symfony Security](https://symfony.com/doc/current/security.html) version.

[Built-in roles usage example](./docs/security/roles.md)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance89

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99% 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

Every ~23 days

Recently: every ~48 days

Total

42

Last Release

56d ago

Major Versions

1.36 → 2.02025-09-01

PHP version history (2 changes)1.0.15PHP &gt;=8.1

2.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f657af8595c7a4ea2cd722fed53f73ef305b87ecd8286968a0c261d005001f5?d=identicon)[OtezVikentiy](/maintainers/OtezVikentiy)

---

Top Contributors

[![OtezVikentiy](https://avatars.githubusercontent.com/u/19647948?v=4)](https://github.com/OtezVikentiy "OtezVikentiy (99 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (1 commits)")

---

Tags

apibundlejsonjsonrpcrpcsymfonyapisymfonybundleswaggerjsonrpc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/otezvikentiy-json-rpc-api/health.svg)

```
[![Health](https://phpackages.com/badges/otezvikentiy-json-rpc-api/health.svg)](https://phpackages.com/packages/otezvikentiy-json-rpc-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[harmbandstra/swagger-ui-bundle

Exposes swagger UI inside your Symfony project through a route (eg. /docs)

42867.3k](/packages/harmbandstra-swagger-ui-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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