PHPackages                             romeritocl/cachet-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. romeritocl/cachet-api-client

ActiveLibrary[API Development](/categories/api)

romeritocl/cachet-api-client
============================

Cachet Api client

v1.1.0(6y ago)132[2 PRs](https://github.com/romeritoCL/cachet-api-client/pulls)MITPHPPHP &gt;=7.2

Since Sep 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/romeritoCL/cachet-api-client)[ Packagist](https://packagist.org/packages/romeritocl/cachet-api-client)[ RSS](/packages/romeritocl-cachet-api-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

Cachet Api Client [![](https://camo.githubusercontent.com/e816adc0dbc3af004852320e67e6f2295eec92593bbb649c3dab58b12b9c3642/68747470733a2f2f63616368657468712e696f2f696d672f6c6f676f2e737667)](https://camo.githubusercontent.com/e816adc0dbc3af004852320e67e6f2295eec92593bbb649c3dab58b12b9c3642/68747470733a2f2f63616368657468712e696f2f696d672f6c6f676f2e737667)
===================================================================================================================================================================================================================================================================================================================================================================

[](#cachet-api-client-)

CircleCI: [![CircleCI](https://camo.githubusercontent.com/1d603a02619f6895ffe3b4d8211d8d80fa15751d80d013e9962d718dec21e1da/68747470733a2f2f636972636c6563692e636f6d2f67682f726f6d657269746f434c2f6361636865742d6170692d636c69656e742f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/romeritoCL/cachet-api-client/tree/master)

[![Latest Stable Version](https://camo.githubusercontent.com/a5e3c7aee872a320fad9a03a57cab356623c600f737e056ca6890bc5a96d6715/68747470733a2f2f706f7365722e707567782e6f72672f726f6d657269746f434c2f6361636865742d6170692d636c69656e742f762f737461626c65)](https://packagist.org/packages/romeritoCL/cachet-api-client)[![composer.lock](https://camo.githubusercontent.com/c4301e5c03760ac71a8c52be576540ae55db183cb4adba3d922fb56a72bb8a50/68747470733a2f2f706f7365722e707567782e6f72672f726f6d657269746f434c2f6361636865742d6170692d636c69656e742f636f6d706f7365726c6f636b)](https://packagist.org/packages/romeritoCL/cachet-api-client)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a16926eb01c09481584a984c9fc51271e12ba8d48e610c3a3c17d7f32489d613/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f6d657269746f434c2f6361636865742d6170692d636c69656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/romeritoCL/cachet-api-client/?branch=master)

✋ What is it?
-------------

[](#hand-what-is-it)

Simple API client for CachetHQ. A PHP Based Api client that will help you organize calls and support objects and models for all Cachet API endpoints. Cachet is an open source status page system written in PHP. .

💾 Installation
--------------

[](#floppy_disk-installation)

Install the library by:

- Downloading it from [here](https://github.com/romeritoCL/cachet-api-client/releases/latest)

- Using Composer:

```
composer require romeritocl/cachet-api-client
```

Finally, be sure to include the autoloader:

```
require_once '/path/to/your-project/vendor/autoload.php';
```

Once the library is ready and inside the project the stub objects will available and the Client class will also available.

Usage
-----

[](#usage)

Setup

```
use DevoraliveCachet\Client;

$endpoint = 'https://demo.cachethq.io/api/v1/';
$token    = '9yMHsdioQosnyVK4iCVR';

$client = new Client($endpoint, $token);
```

StandAlone Errors
-----------------

[](#standalone-errors)

Doctrine annotation error:

```
PHP Fatal error:  Uncaught exception 'Doctrine\Common\Annotations\AnnotationException' with message '[Semantical Error] The annotation "@JMS\Serializer\Annotation\Type" in property (...) does not exist, or could not be auto-loaded.'
```

Can fix it registering the JMS namespace, locate your bootstrap.php file and add this line at the end:

```
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists');
```

### Components

[](#components)

Get components

```
$components = $client->getComponents();

foreach ($components as $component) {
    echo $component->getName();
}
```

Sorting

```
$components = $client->getComponents([
    'sort' => 'id',
    'order' => 'desc'
]);
```

Get by id

```
$component = $client->getComponent(3);
```

Create new component

```
$component = new Component();
$component->setName('My new component');
$component->setDescription('Component description');
$component->setLink('https://github.com/mangati/cachet');
$component->setStatus(Component::STATUS_OPERATIONAL);

$client->addComponent($component);
```

Update an existing component

```
$component = new Component();
$component->setId(3);
$component->setName('My new component (updated)');

$client->updateComponent($component);
```

Delete an existing component

```
$id = 3;

$client->deleteComponent($id);
```

### Incidents

[](#incidents)

Get incidents

```
$incidents = $client->getIncidents();

foreach ($incidents as $incident) {
    echo $incident->getName();
}
```

Sorting

```
$incidents = $client->getIncidents([
    'sort' => 'id',
    'order' => 'desc'
]);
```

Get by id

```
$incident = $client->getIncident(3);
```

Create new incident

```
$incident = new Incident();
$incident->setName('My new incident');
$incident->setMessage('incident message');
$incident->setStatus(Incident::STATUS_WATCHING);

$client->addIncident($incident);
```

Update an existing incident

```
$incident = new Incident();
$incident->setId(3);
$incident->setStatus(Incident::STATUS_FIXED);

$client->updateIncident($incident);
```

Delete an existing incident

```
$id = 3;

$client->deleteIncident($id);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.3% 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 ~2 days

Total

3

Last Release

2471d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/301758?v=4)[Cesar Romero ](/maintainers/romeritoCL)[@romeritoCL](https://github.com/romeritoCL)

---

Top Contributors

[![romeritoCL](https://avatars.githubusercontent.com/u/301758?v=4)](https://github.com/romeritoCL "romeritoCL (20 commits)")[![rogeriolino](https://avatars.githubusercontent.com/u/1065082?v=4)](https://github.com/rogeriolino "rogeriolino (15 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (3 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (1 commits)")

---

Tags

apicachetclientphpclientstatuscachetCachetHQ

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/romeritocl-cachet-api-client/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[resend/resend-php

Resend PHP library.

596.2M35](/packages/resend-resend-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

72287.1k1](/packages/mozex-anthropic-laravel)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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