PHPackages                             enm/json-api-client - 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. enm/json-api-client

ActiveLibrary[API Development](/categories/api)

enm/json-api-client
===================

Abstract client-side php implementation of the json api specification (jsonapi.org)

4.0.1(6y ago)1836.2k↓71.4%7[1 issues](https://github.com/eosnewmedia/JSON-API-Client/issues)[1 PRs](https://github.com/eosnewmedia/JSON-API-Client/pulls)1MITPHP

Since Jul 20Pushed 3y ago6 watchersCompare

[ Source](https://github.com/eosnewmedia/JSON-API-Client)[ Packagist](https://packagist.org/packages/enm/json-api-client)[ RSS](/packages/enm-json-api-client/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (13)Used By (1)

JSON API Client
===============

[](#json-api-client)

[![Build Status](https://camo.githubusercontent.com/d7dd246ea159c249c6da083b72fbbb7f484116431d887a2519bc66f482bee307/68747470733a2f2f7472617669732d63692e6f72672f656f736e65776d656469612f4a534f4e2d4150492d436c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/eosnewmedia/JSON-API-Client)

Abstract client-side PHP implementation of the [json api specification](http://jsonapi.org/format/).

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

[](#installation)

```
composer require enm/json-api-client
```

It's recommended to install `kriswallsmith/buzz` as http-client and `nyholm/psr7` for http factories.

```
composer require kriswallsmith/buzz nyholm/psr7
```

You can also use any HTTP client which implements [PSR-18](https://www.php-fig.org/psr/psr-18/).

Usage
-----

[](#usage)

First you should read the docs at [enm/json-api-common](https://eosnewmedia.github.io/JSON-API-Common/) where all basic structures are defined.

Your API client is an instance of `Enm\JsonApi\Client\JsonApiClient`, which requires a PSR-18 HTTP client (`Psr\Http\Client\ClientInterface`) to execute requests.

```
$client = new JsonApiClient(
    'http://example.com/api',
    $httpClient, // instance of Psr\Http\Client\ClientInterface
    $uriFactory, // instance of Psr\Http\Message\UriFactoryInterface
    $requestFactory, // instance of Psr\Http\Message\RequestFactoryInterface
    $streamFactory, // instance of Psr\Http\Message\StreamFactoryInterface
    new Serializer(),
    new Deserializer()
);

$request = $client->createGetRequest(new Uri('/myResources/1')); // will fetch the resource at http://example.com/api/myResources/1
$request->requestInclude('myRelationship'); // include a relationship

$response = $client->execute($request);

$document = $response->document();
$myResource = $document->data()->first(); // the resource fetched by this request
$myIncludedResources = $document->included()->all(); // the included resources fetched with the include parameter
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~187 days

Total

9

Last Release

2291d ago

Major Versions

1.2.0 → 3.0.02018-09-27

3.0.1 → 4.0.02019-08-29

### Community

Maintainers

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

---

Top Contributors

[![pmarien](https://avatars.githubusercontent.com/u/8394874?v=4)](https://github.com/pmarien "pmarien (2 commits)")[![bogomolov-dev](https://avatars.githubusercontent.com/u/127733?v=4)](https://github.com/bogomolov-dev "bogomolov-dev (1 commits)")[![MaDKaTZe](https://avatars.githubusercontent.com/u/963759?v=4)](https://github.com/MaDKaTZe "MaDKaTZe (1 commits)")[![richgerdes](https://avatars.githubusercontent.com/u/1626100?v=4)](https://github.com/richgerdes "richgerdes (1 commits)")

---

Tags

abstractionapiapi-clientclientjson-apiphpphp7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/enm-json-api-client/health.svg)

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60216.0M83](/packages/mollie-mollie-api-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

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