PHPackages                             henrywhitaker3/healthchecks-io - 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. henrywhitaker3/healthchecks-io

ActiveLibrary[API Development](/categories/api)

henrywhitaker3/healthchecks-io
==============================

A simple PHP healthchecks.io wrapper

v1.0.2(5y ago)6158.0k↓19.8%1[6 PRs](https://github.com/henrywhitaker3/PHP-healthchecks.io/pulls)1MITPHPPHP &gt;=7.2.5

Since Aug 11Pushed 4y ago2 watchersCompare

[ Source](https://github.com/henrywhitaker3/PHP-healthchecks.io)[ Packagist](https://packagist.org/packages/henrywhitaker3/healthchecks-io)[ Docs](https://github.com/henrywhitaker3/PHP-healthchecks.io)[ RSS](/packages/henrywhitaker3-healthchecks-io/feed)WikiDiscussions master Synced 1mo ago

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

PHP healthchecks.io
===================

[](#php-healthchecksio)

[![version](https://camo.githubusercontent.com/9a850f2f7961d520e3a6065aca6b957cb1d4a4859010aae31147cf444825228e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f68656e727977686974616b6572332f5048502d6865616c7468636865636b732e696f3f636f6c6f723d6c696768742d677265656e266c6162656c3d76657273696f6e267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/9a850f2f7961d520e3a6065aca6b957cb1d4a4859010aae31147cf444825228e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f68656e727977686974616b6572332f5048502d6865616c7468636865636b732e696f3f636f6c6f723d6c696768742d677265656e266c6162656c3d76657273696f6e267374796c653d666c61742d737175617265) [![GitHub Workflow Status](https://camo.githubusercontent.com/4aa1ff9d9353cacf38e7199b7c36d418c8c5a491c36bc8404433b70a71978871/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f68656e727977686974616b6572332f5048502d6865616c7468636865636b732e696f2f504850556e69743f6c6162656c3d6275696c64266c6f676f3d676974687562267374796c653d666c61742d737175617265)](https://github.com/henrywhitaker3/PHP-healthchecks.io/actions) [![last_commit](https://camo.githubusercontent.com/bf602c7a8168ed3e9ff1b78a4d5de6de36c4c0766608ca505eeb16c63b09d27c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f68656e727977686974616b6572332f5048502d6865616c7468636865636b732e696f3f7374796c653d666c61742d737175617265)](https://github.com/henrywhitaker3/PHP-healthchecks.io/commits) [![issues](https://camo.githubusercontent.com/37727e65a0f25491918f001261e6bc253197833a8c25c28ffe4d3bf671483f1a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f68656e727977686974616b6572332f5048502d6865616c7468636865636b732e696f3f7374796c653d666c61742d737175617265)](https://github.com/henrywhitaker3/PHP-healthchecks.io/issues) [![commit_freq](https://camo.githubusercontent.com/8e47303d0da7eee4bd45f42d3c897c66da330ffc494475d89cb88629e255759b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f6d2f68656e727977686974616b6572332f5048502d6865616c7468636865636b732e696f3f7374796c653d666c61742d737175617265)](https://github.com/henrywhitaker3/PHP-healthchecks.io/commits) [![license](https://camo.githubusercontent.com/537de840054f7a3147bcd12e1e6206d9823e00eb0794b4646936ff70dc70aada/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f68656e727977686974616b6572332f5048502d6865616c7468636865636b732e696f3f7374796c653d666c61742d737175617265)](https://github.com/henrywhitaker3/PHP-healthchecks.io/blob/master/LICENSE)

This package provides simple methods to interact with the [healthchecks.io](https://healthchecks.io) API.

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

[](#installation)

```
composer require henrywhitaker3/healthchecks-io
```

Usage
-----

[](#usage)

This package provides two classes you can use:

### Healthchecks

[](#healthchecks)

This class is just used to update a healthchecks.io endpoint.

To create a new instance, you need to pass the UUID for the endpoint you want to update:

```
$hc = new Healthchecks('SAMPLE-UUID-HERE');
```

Once you have your created a new instance, there are 3 methods to use:

```
$hc->success(); // sends a 'success' signal
$hc->fail(); // sends a 'fail' signal
$hc->start(); // sends a 'start' signal
```

### HealthchecksManager

[](#healthchecksmanager)

This class can be used to interact with the healthchecks.io management API. Creating a new instance is simple:

```
$hm = new HealthchecksManager('SAMPLE-API-KEY');
```

You now have several methods you can use:

```
$hm->listChecks(); // lists all checks
$hm->getCheck('UUID'); // get info for a specific check
$hm->pauseCheck('UUID'); // pauses a check
$hm->resumeCheck('UUID'); // pings a check to resume it
$hm->deleteCheck('UUID'); // deletes the check
$hm->getCheckPings('UUID'); // gets a list of pings for the check
$hm->getCheckStatusChanges('UUID'); // returns a list of "flips" this check has experienced
$hm->createCheck($args); // create a new check
$hm->updateCheck('UUID', $args); // update an existing check
$hm->integrations(); // get a list of integrations (i.e. slack, discord etc.)
```

Contributing
------------

[](#contributing)

Contributions are welcome, but please write tests for whatever you add. Create a new file in the `tests/tests` directory with the following structure:

```
