PHPackages                             corbpie/hosthatch-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. corbpie/hosthatch-api

ActiveLibrary[API Development](/categories/api)

corbpie/hosthatch-api
=====================

HostHatch API class

05PHP

Since Nov 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cp6/hosthatch-api)[ Packagist](https://packagist.org/packages/corbpie/hosthatch-api)[ RSS](/packages/corbpie-hosthatch-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

HostHatch VPS API class wrapper
===============================

[](#hosthatch-vps-api-class-wrapper)

An easy to implement and use PHP class wrapper for the [HostHatch](https://cloud.hosthatch.com/a/3772) VPS API version 1.

![Generic badge](https://camo.githubusercontent.com/7b02ba719829a8907600951cffc933bff9ee80813cde06dd575affd1b8cd147d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e312d626c75652e737667)![Generic badge](https://camo.githubusercontent.com/4c1075d837760399f232818ad93676a87921fc7d94e5cadf41f9012f324c6a1f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d707572706c652e737667)![Generic badge](https://camo.githubusercontent.com/1c0232aef8b81058483cd5415d118ee7333bb259083731de8a5294feaadef74e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4150492d76312d7265642e737667)

Table of contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installing &amp; usage](#installing)
    - [Setting your API key](#setting-api-key)
- [Products](#products)
    - [List all products](#list-products)
- [Servers](#servers)
    - [Get servers](#list-servers)
    - [Get server](#list-server)
    - [Get server status](#list-server-status)
    - [Deploy a server](#deploy-server)
    - [Boot server](#boot-server)
    - [Shutdown server](#shutdown-server)
    - [Reboot server](#reboot-server)
    - [Upgrade server](#upgrade-server)
    - [Cancel server](#cancel-server)

**Note the Host Hatch API is seemingly still in development and not finalized or reliable**

### 0.1 changes

[](#01-changes)

- Initial commits and files

### Requirements

[](#requirements)

- PHP 8.2

Usage
-----

[](#usage)

Install with composer:

```
composer require corbpie/hosthatch-api

```

Use like:

```
require __DIR__ . '/vendor/autoload.php';

use Corbpie\HostHatchAPI\HostHatch;

$hh = new HostHatch();
```

#### Setting your API key:

[](#setting-your-api-key)

**Option 1**

Line 9 `HostHatch.php`

```
const API_KEY = 'XXXX-XXXX-XXXX';
```

**Option 2**

When you call a new class you can initialise with the API key

```
$hh = new HostHatch('PUT-API-KEY-HERE');
```

---

List available Host Hatch servers to deploy

```
$hh->getProducts();
```

returns `array`

---

Get your current servers

```
$hh->getServers();
```

returns `array`

---

Get server

int `$server_id`

```
$hh->getServer($server_id);
```

returns `array`

---

Get server status

int `$server_id`

```
$hh->getServerStatus($server_id);
```

returns `array`

---

Boot server

int `$server_id`

```
$hh->bootServer($server_id);
```

returns `array`

---

Shutdown server

int `$server_id`

```
$hh->shutdownServer($server_id);
```

returns `array`

---

Reboot server

int `$server_id`

```
$hh->rebootServer($server_id);
```

returns `array`

---

Upgrade server

int `$server_id`

array `$parameters`

```
$parameters = [
  'product' => 'nvme-8gb',
  'upgrade_disk' => false
];

$hh->upgradeServer($server_id, $parameters);
```

returns `array`

---

Cancel server

int `$server_id`

array `$parameters`

```
$parameters = [
  'reason' => 'No longer need this VPS',
  'immediate' => false
];

$hh->cancelServer($server_id, $parameters);
```

returns `array`

---

Deploy / create a server

array `$parameters`

```
$parameters = [
  'product' => 'nvme-2gb',
  'location' => 'AMS',
  'billing' => 'monthly',
  'image' => 'ubuntu22',
  'hostname' => 'test.com'
];

$hh->deployServer($parameters);
```

returns `array`

---

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

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

---

Top Contributors

[![cp6](https://avatars.githubusercontent.com/u/9095402?v=4)](https://github.com/cp6 "cp6 (21 commits)")

---

Tags

apihosthatchphpvpswrapper

### Embed Badge

![Health badge](/badges/corbpie-hosthatch-api/health.svg)

```
[![Health](https://phpackages.com/badges/corbpie-hosthatch-api/health.svg)](https://phpackages.com/packages/corbpie-hosthatch-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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