PHPackages                             chris-doehring/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. [HTTP &amp; Networking](/categories/http)
4. /
5. chris-doehring/enm-json-api-client

Abandoned → [dogado/json-api-client](/?search=dogado%2Fjson-api-client)ArchivedLibrary[HTTP &amp; Networking](/categories/http)

chris-doehring/enm-json-api-client
==================================

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

6.1.0(5y ago)01.0kMITPHPPHP ^7.4 || ^8.0

Since Jul 20Pushed 4y agoCompare

[ Source](https://github.com/chris-doehring/ENM-JSON-API-Client)[ Packagist](https://packagist.org/packages/chris-doehring/enm-json-api-client)[ RSS](/packages/chris-doehring-enm-json-api-client/feed)WikiDiscussions 6.x Synced today

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

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

[](#json-api-client)

[![Build Status](https://camo.githubusercontent.com/3b18dd4b3d3289f6ffb661eeb6c0ab2a522d383de6359748a81503be00c96b11/68747470733a2f2f7472617669732d63692e6f72672f63687269732d646f656872696e672f454e4d2d4a534f4e2d4150492d436c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/chris-doehring/ENM-JSON-API-Client)[![Coverage Status](https://camo.githubusercontent.com/fd7b0b943183a5c54f449921db21e3a6a608fc3f688bdc7e04699c8553cf8bc2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f63687269732d646f656872696e672f454e4d2d4a534f4e2d4150492d436c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/chris-doehring/ENM-JSON-API-Client?branch=master)[![Total Downloads](https://camo.githubusercontent.com/bddc931f3e47e16ee1d3e6b966285a272a917af01d6d5f10ba2c94634cf4b3fc/68747470733a2f2f706f7365722e707567782e6f72672f63687269732d646f656872696e672f656e6d2d6a736f6e2d6170692d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/chris-doehring/enm-json-api-client)[![Latest Stable Version](https://camo.githubusercontent.com/0e99de6505eff6f097a7a9f2908bc39f3bbd49af89e6585a00614a2492cd782f/68747470733a2f2f706f7365722e707567782e6f72672f63687269732d646f656872696e672f656e6d2d6a736f6e2d6170692d636c69656e742f762f737461626c65)](https://packagist.org/packages/chris-doehring/enm-json-api-client)[![Latest Unstable Version](https://camo.githubusercontent.com/fa626b3a346ab083186693546c83eef786da7312c100d0bb894faebc2464937e/68747470733a2f2f706f7365722e707567782e6f72672f63687269732d646f656872696e672f656e6d2d6a736f6e2d6170692d636c69656e742f762f756e737461626c652e706e67)](https://packagist.org/packages/chris-doehring/enm-json-api-client)[![License](https://camo.githubusercontent.com/00a002044e967663d0658f0ce70fe49ec1d79f64240fc395db946b9c0dfe8cf4/68747470733a2f2f706f7365722e707567782e6f72672f63687269732d646f656872696e672f656e6d2d6a736f6e2d6170692d636c69656e742f6c6963656e7365)](https://packagist.org/packages/chris-doehring/enm-json-api-client)

**This package is abandoned. Please use [`dogado/json-api-client`](https://github.com/dogado-group/json-api-client) instead.**

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

It's based on the [original creation](https://github.com/eosnewmedia/JSON-API-Client) of the [eosnewmedia team](https://github.com/eosnewmedia) and the maintainer [Philipp Marien](https://github.com/pmarien).

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

[](#installation)

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

It's recommended to install `guzzlehttp/guzzle` version `^7.0` as http-client and `http-interop/http-factory-guzzle` for [PSR-17](https://www.php-fig.org/psr/psr-17/) compatible factories.

```
composer require guzzlehttp/guzzle http-interop/http-factory-guzzle
```

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

Usage
-----

[](#usage)

First you should read the docs at [chris-doehring/enm-json-api-common](https://github.com/chris-doehring/ENM-JSON-API-Common/tree/5.x/docs) where all basic structures are defined.

Your API client is an instance of `Enm\JsonApi\Client\JsonApiClient`, which requires a [PSR-18](https://www.php-fig.org/psr/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

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 69.7% 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 ~95 days

Recently: every ~89 days

Total

16

Last Release

1791d ago

Major Versions

1.2.0 → 3.0.02018-09-27

3.0.1 → 4.0.02019-08-29

4.0.1 → 5.0.02020-05-05

5.1.2 → 6.0.02020-07-27

PHP version history (3 changes)5.0.0PHP &gt;=7.2

6.0.0PHP ^7.4

6.1.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f25bd8f4a5f0287916cd551d6d29410527d9fa8a70d1a9f6705ac8d4e4b1a04?d=identicon)[chris-doehring](/maintainers/chris-doehring)

---

Top Contributors

[![chris-doehring](https://avatars.githubusercontent.com/u/6341536?v=4)](https://github.com/chris-doehring "chris-doehring (23 commits)")[![tgroszewski](https://avatars.githubusercontent.com/u/6085365?v=4)](https://github.com/tgroszewski "tgroszewski (5 commits)")[![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

psr-7jsonapiclientpsr-18

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[vultr/vultr-php

The Official Vultr API PHP Wrapper.

2243.9k1](/packages/vultr-vultr-php)[amphp/http-client-psr7

PSR-7 adapter for Amp's HTTP client.

1454.7k4](/packages/amphp-http-client-psr7)[chillerlan/php-httpinterface

A PSR-7/17/18 http message/client implementation

1417.1k5](/packages/chillerlan-php-httpinterface)

PHPackages © 2026

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