PHPackages                             thg/thg-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. thg/thg-client

ActiveLibrary[API Development](/categories/api)

thg/thg-client
==============

THG Open API client

2.0.0(1y ago)35841[1 PRs](https://github.com/UK2group/thghosting-cilent/pulls)GPL-2.0-onlyPHPPHP ^7.2 || ^8.0CI passing

Since Mar 1Pushed 1y ago9 watchersCompare

[ Source](https://github.com/UK2group/thghosting-cilent)[ Packagist](https://packagist.org/packages/thg/thg-client)[ RSS](/packages/thg-thg-client/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (1)Versions (17)Used By (0)

THG Hosting Open API Client
===========================

[](#thg-hosting-open-api-client)

PHP Client for easier use of Open API

```
    $thgHostingClient = new ThgHosting\ThgHostingClient($_ENV['X-Api-Token']);
```

Install
=======

[](#install)

```
composer require thg/thg-client
```

Methods
=======

[](#methods)

Request
-------

[](#request)

*Creates custom request to chosen EP.*

```
    $thgHostingClient->request(
        string $method,         // Allowed methods: GET, POST, DELETE, PUT, PATCH
        string $endpoint,       // Path to chosen EP for example: "ssd-vps/plans"
        array $arguments = [],  // Body of request
        array $files     = [    // Files to send with request
            [
                // Mime type of file
                "mime" => "image/png",
                // Name of file
                "name" => "file.png",
                // Base64 encoded file
                "file" => "iVBORw0KGgoAAAANSUhEUgAAAIIAAABzCAYAAABUzdpBAAAIj0lEQVR4Xu2deVRVVRTGP0IN0QRRc8JQ0yy1XI7ZynRlTmmmYCUSKFm4HFFzKUY4g6VMag6..."
            ],
            "/path/to/file.pdf" // Absolute path to file
        ]
    );
```

Get SSD VPS Plans
-----------------

[](#get-ssd-vps-plans)

*Returns SSD VPS Plans with net price in USD.*

```
    $thgHostingClient->getSsdVpsPlans();
```

Get SSD VPS Locations
---------------------

[](#get-ssd-vps-locations)

*Returns SSD VPS Locations.*

```
    $thgHostingClient->getSsdVpsLocations();
```

Get Custom OSes for SSD VPS
---------------------------

[](#get-custom-oses-for-ssd-vps)

*Returns Custom OSes for SSD VPS.*

```
    $thgHostingClient->getSsdVpsCustomTemplates(
        int $locationId // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
    );
```

Create an SSD VPS Server
------------------------

[](#create-an-ssd-vps-server)

*Creates an SSD VPS Server.*

```
    $thgHostingClient->createSsdVpsServer(
        int     $locationId,              // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        string  $label,                   // Label for the new SSD VPS Server
        string  $hostname,                // Hostname for the new SSD VPS Server
        string  $productName,             // name of the chosen SSD VPS plan (see “Get SSD VPS Plans”)
        ?string $osComponentCode  = null, // Optional; Component code of the SSD VPS operating system (see “Get SSD VPS Operating Systems”) (you have to pass either os_component_code or custom_template_id)
        ?bool   $backups          = null, // Optional; If set to true, server will be created with Backup Protection
        ?bool   $billHourly       = null, // Optional; If set to true, billing will be set hourly, otherwise monthly billing will be used
        ?int    $customTemplateId = null  // Optional; Pass here the Template ID of Custom OS (see “Get Custom OSes for SSD VPS”) (you have to pass either os_component_code or custom_template_id)
    );
```

Get SSD VPS Operating Systems
-----------------------------

[](#get-ssd-vps-operating-systems)

*Returns SSD VPS Operating Systems.*

```
    $thgHostingClient->getSsdVpsOses(
        int $locationId // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
    );
```

Get SSD VPS Servers
-------------------

[](#get-ssd-vps-servers)

*Returns SSD VPS Servers.*

```
    $thgHostingClient->getSsdVpsServers(
        ?int $locationId = null // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
    );
```

Get SSD VPS Server Details
--------------------------

[](#get-ssd-vps-server-details)

*Returns an SSD VPS Server’s details.*

```
    $thgHostingClient->getSsdVpsServerDetails(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server
    );
```

Delete SSD VPS Server
---------------------

[](#delete-ssd-vps-server)

*Deletes an SSD VPS Server.*

```
    $thgHostingClient->deleteSsdVpsServer(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server.
    );
```

Get SSD VPS Server Status
-------------------------

[](#get-ssd-vps-server-status)

*Returns an SSD VPS Server’s status.*

```
    $thgHostingClient->getSsdVpsServerStatus(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server
    );
```

Power On an SSD VPS Server
--------------------------

[](#power-on-an-ssd-vps-server)

*Startup an SSD VPS Server.*

```
    $thgHostingClient->powerOnSsdVpsServer(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server
    );
```

Power Off SSD VPS Server
------------------------

[](#power-off-ssd-vps-server)

*Shutdown an SSD VPS Server.*

```
    $thgHostingClient->powerOffSsdVpsServer(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server
    );
```

Reboot SSD VPS Server
---------------------

[](#reboot-ssd-vps-server)

*Reboot an SSD VPS Server.*

```
    $thgHostingClient->rebootSsdVpsServer(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server
    );
```

Reboot an SSD VPS Server in Recovery Mode
-----------------------------------------

[](#reboot-an-ssd-vps-server-in-recovery-mode)

*Reboot an SSD VPS in Recovery Mode.*

```
    $thgHostingClient->rebootSsdVpsServerInRecoveryMode(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server
    );
```

Reset Password of an SSD VPS Server
-----------------------------------

[](#reset-password-of-an-ssd-vps-server)

*Change the virtual machine’s root password to regain control of a machine should root access be lost or forgotten.*

```
    $thgHostingClient->resetSsdVpsServerPassword(
        int     $locationId,        // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int     $serverId,          // ID of the SSD VPS Server
        ?string $newPassword = null // Root password to set. Must be between 6 and 32 characters and valid for the OS of the target virtual machine.
    );
```

Get SSD VPS Server Backups
--------------------------

[](#get-ssd-vps-server-backups)

*Returns an SSD VPS Server’s Backups.*

```
    $thgHostingClient->getSsdVpsServerBackups(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId    // ID of the SSD VPS Server
    );
```

Add Note to an SSD VPS Server Backup
------------------------------------

[](#add-note-to-an-ssd-vps-server-backup)

*Add note to an SSD VPS Server’s backup.*

```
    $thgHostingClient->addSsdVpsBackupNote(
        int    $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int    $serverId,   // ID of the SSD VPS Server
        int    $backupId,   // ID of the SSD VPS Backup (see “Get SSD VPS Server Backups”)
        string $note        // Note
    );
```

Delete SSD VPS Server Backup
----------------------------

[](#delete-ssd-vps-server-backup)

*Deletes an SSD VPS Server’s Backup.*

```
    $thgHostingClient->deleteSsdVpsBackup(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId,   // ID of the SSD VPS Server
        int $backupId    // ID of the SSD VPS Backup (see “Get SSD VPS Server Backups”)
    );
```

Restore SSD VPS Server with Backup
----------------------------------

[](#restore-ssd-vps-server-with-backup)

*Restore an SSD VPS Backup. (Overwrites existing SSD VPS with backed up image).*

```
    $thgHostingClient->restoreSsdVpsBackup(
        int $locationId, // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId,   // ID of the SSD VPS Server
        int $backupId    // ID of the SSD VPS Backup (see “Get SSD VPS Server Backups”)
    );
```

Create Backups
--------------

[](#create-backups)

*Create SSD VPS Backups*

```
    $thgHostingClient->createBackup(
        int $locationId // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId,  // ID of the SSD VPS Server
    );
```

Create IP Request
-----------------

[](#create-ip-request)

*Request a new IP address.*

```
    $thgHostingClient->ssdVpsIpRequest(
        int $locationId // ID of the SSD VPS Location (see “Get SSD VPS Locations”)
        int $serverId,  // ID of the SSD VPS Server
        string $reason, // Detailed explanation of why the IP is needed
        array $ipCount  // Number of IP addresses to request in at least one of the following categories [terminal, vpn, mailing, application, voice, sqldb, ssl_cert, media, other]
    );
```

Get Service Details
-------------------

[](#get-service-details)

*Get details for a service with net price in USD.*

```
    $thgHostingClient->getServiceDetails(
        int $serviceId // ID of the Service
    );
```

Get DNS Zones
-------------

[](#get-dns-zones)

*Get all DNS zones.*

```
    $thgHostingClient->getDnsZones();
```

Create DNS Zone
---------------

[](#create-dns-zone)

*Create a DNS zone.*

```
    $thgHostingClient->createDnsZone(
        string $domainName, // Name of the domain
        string $ip          // IP address
    );
```

Get DNS Zone Details
--------------------

[](#get-dns-zone-details)

*Get DNS zone information.*

```
    $thgHostingClient->getDnsZoneDetails(
        int $zoneId // ID of the DNS Zone (see “Get DNS Zones”)
    );
```

Delete DNS Zone
---------------

[](#delete-dns-zone)

*Remove a DNS zone.*

```
    $thgHostingClient->deleteDnsZone(
        int $zoneId // ID of the DNS Zone (see “Get DNS Zones”)
    );
```

Add Record to DNS Zone
----------------------

[](#add-record-to-dns-zone)

*Adds a DNS record to the specified zone.*

```
    $thgHostingClient->addRecordToDnsZone(
        int     $zoneId             // ID of the DNS Zone (see “Get DNS Zones”)
        string  $type,              // Zone type (A / AAAA etc.)
        string  $host,              // Host name or IP address
        string  $content,           // Content depending on the zone type, example: mail.hostname.com
        int     $ttl,               // Time to live - the added record or time to ping/fetch the updated records
        ?string $service    = null, // The symbolic name of the desired service. (only when record type SRV)
        ?string $protocol   = null, // The transport protocol of the desired service. (only when record type SRV)
        ?int    $port       = null, // The TCP or UDP port on which the service is to be found. (only when record type SRV)
        ?int    $weight     = null, // A relative weight for records with the same priority, higher value means higher chance of getting picked. (only when record type SRV)
        ?int    $mxPriority = null  // The priority of the target host, lower value means more preferred. (only when record type SRV or MX)
    );
```

Update DNS Zone Record
----------------------

[](#update-dns-zone-record)

*Update an existing DNS zone record.*

```
    $thgHostingClient->updateDnsZoneRecord(
        int     $zoneId,            // ID of the DNS Zone (see “Get DNS Zones”)
        int     $recordId,          // ID of the DNS Zone record (see “Get DNS Zone Details”)
        string  $host,              // Host name or IP address
        string  $content,           // Content depending on the zone type, example: mail.hostname.com
        int     $ttl,               // Time to live - the added record or time to ping/fetch the updated records
        ?string $service    = null, // The symbolic name of the desired service. (only when record type SRV)
        ?string $protocol   = null, // The transport protocol of the desired service. (only when record type SRV)
        ?int    $port       = null, // The TCP or UDP port on which the service is to be found. (only when record type SRV)
        ?int    $weight     = null, // A relative weight for records with the same priority, higher value means higher chance of getting picked. (only when record type SRV)
        ?int    $mxPriority = null  // The priority of the target host, lower value means more preferred. (only when record type SRV or MX)
    );
```

Delete DNS Zone Record
----------------------

[](#delete-dns-zone-record)

*Remove a DNS record.*

```
    $thgHostingClient->deleteDnsZoneRecord(
        int $zoneId,  // ID of the DNS Zone (see “Get DNS Zones”)
        int $recordId // ID of the DNS Zone record
    );
```

Get Servers
-----------

[](#get-servers)

*Get a list of all servers assigned to an account.*

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

Get Server Details
------------------

[](#get-server-details)

*Get full server profile.*

```
    $thgHostingClient->getServerDetails(
        string $serverId // ID of the Server (see “Get Servers”)
    );
```

Get Server Power Status
-----------------------

[](#get-server-power-status)

*Retrieve the current power state of the given dedicated server.*

```
    $thgHostingClient->getServerPowerStatus(
        string $serverId // ID of the Server (see “Get Servers”)
    );
```

Power On Server
---------------

[](#power-on-server)

*Request the specified dedicated server to be turned on.*

```
    $thgHostingClient->powerOnServer(
        string $serverId // ID of the Server (see “Get Servers”)
    );
```

Power Off Server
----------------

[](#power-off-server)

*Request the specified dedicated server to be turned off.*

```
    $thgHostingClient->powerOffServer(
        string $serverId // ID of the Server (see “Get Servers”)
    );
```

Reboot Server
-------------

[](#reboot-server)

*Request the specified dedicated server to be rebooted.*

```
    $thgHostingClient->rebootServer(
        string $serverId // ID of the Server (see “Get Servers”)
    );
```

Change Server Friendly Name
---------------------------

[](#change-server-friendly-name)

*Request friendly name change of specified dedicated server.*

```
    $thgHostingClient->changeServerFriendlyName(
        string $serverId, // ID of the Server (see “Get Servers”)
        $body
    );
```

Set rDNS entry for IP address
-----------------------------

[](#set-rdns-entry-for-ip-address)

*Set rDNS entry for IP address of specified dedicated server.*

```
    $thgHostingClient->changeServerFriendlyName(
        string $serverId, // ID of the Server (see “Get Servers”)
	string $ipAddress, //IP address the domain name should be associated with
        $body
    );
```

get SSH keys assigned to a server
---------------------------------

[](#get-ssh-keys-assigned-to-a-server)

*Get list of SSH keys currently assigned to given server.*

```
    $thgHostingClient->getServerSshKeys(
        string $serverId // ID of the Server (see “Get Servers”)
    );
```

assign SSH key(s) to servers
----------------------------

[](#assign-ssh-keys-to-servers)

*Assign one or more SSH keys to given server.*

```
    $thgHostingClient->assignServerSshKeys(
        string $serverId, // ID of the Server (see “Get Servers”)
        array $sshKeyIds  // array of SSH key ids to be assigned to the server
    );
```

un-assign SSH key(s) to servers
-------------------------------

[](#un-assign-ssh-keys-to-servers)

*Un-assign one or more SSH keys from given server.*

```
    $thgHostingClient->unAssignServerSshKeys(
        string $serverId, // ID of the Server (see “Get Servers”)
        array $sshKeyIds  // array of SSH key ids to be un-assigned to the server
    );
```

Set a custom PXE boot URL
-------------------------

[](#set-a-custom-pxe-boot-url)

*Specify a custom PXE boot URL to load your preferred network boot environment.*

```
    $thgHostingClient->setPxeUrl(
        string $serverId, // ID of the Server (see “Get Servers”)
        string $pxeScriptUrl  // URL to PXE script
    );
```

Get Server Bandwidth Graph
--------------------------

[](#get-server-bandwidth-graph)

*Get a graphical representation of the bandwidth usage for a specific server over the given period.*

```
    $thgHostingClient->getServerBandwidthGraph(
        int    $serverId,           // ID of the Server (see “Get Servers”)
        string $periodStart = null, // Optional. And RFC3339/ISO8601 date-time string representing the start of period of the dataset. Defaults to the start of today.
        string $periodEnd   = null  // Optional. And RFC3339/ISO8601 date-time string representing the end of period of the dataset. Defaults to one month before the start of today
    );
```

Create IP Request
-----------------

[](#create-ip-request-1)

*Request a new IP address*

```
    $thgHostingClient->bareMetalIpRequest(
        int $serverId,  // ID of the Bare Metal Server
        string $reason, // Detailed explanation of why the IP is needed
        array $ipCount  // Number of IP addresses to request in at least one of the following categories [terminal, vpn, mailing, application, voice, sqldb, ssl_cert, media, other]
    );
```

Get Server OS List
------------------

[](#get-server-os-list)

*Get a list of available operating systems for provisioning a specific server.*

```
    $thgHostingClient->getServerOsList(
        int $serverId // ID of the Server (see “Get Servers”)
    );
```

Reimage Server
--------------

[](#reimage-server)

*Reimage a server with a new operating system.*

```
    $thgHostingClient->reimageServer(
        int    $serverId,       // ID of the Server (see “Get Servers”)
        string $osCode,         // Code of the OS to reimage the server with (see “Get Server OS List”)
        string $reason = null   // Optional. Reason for reimage
    );
```

Get IPMI details for server
---------------------------

[](#get-ipmi-details-for-server)

*Get IPMI details for server.*

```
    $thgHostingClient-getServerIPMIDetails(
        int $serverId // ID of the Server (see “Get Servers”)
    );
```

Create VPN user to access IPMI interface
----------------------------------------

[](#create-vpn-user-to-access-ipmi-interface)

*Create VPN user to access IPMI interface.*

```
    $thgHostingClient-createServerIPMICredentials(
        int $serverId // ID of the Server (see “Get Servers”)
    );
```

Delete VPN access to IPMI interface
-----------------------------------

[](#delete-vpn-access-to-ipmi-interface)

*Delete VPN access to IPMI interface.*

```
    $thgHostingClient-deleteServerIPMICredentials(
        int $serverId // ID of the Server (see “Get Servers”)
    );
```

Add Backup to Bare Metal Servers
--------------------------------

[](#add-backup-to-bare-metal-servers)

*Add Bandwidth*

```
    $thgHostingClient->addBandwidth(
        int $locationId //Bandwidth location ID
        int $quantity  // Quantity of bandwidth to add (in TB)
    );
```

Get Tickets
-----------

[](#get-tickets)

*Get a list of active support tickets.*

```
    $thgHostingClient->getTickets();
```

Create Ticket
-------------

[](#create-ticket)

*Create a new support ticket.*

```
    $thgHostingClient->createTicket(
        string $body,            // Ticket body
        string $subject,         // Subject
        int    $department  = 0, // Ticket Department - Default: 0 (General)
        int    $priority    = 0, // Priority of a Ticket (Default: 0 = Low, 1= Normal, 2 = High, 3 = Urgent)
        array  $attachments = [] // How to attach files you can find described in `request` method
    );
```

Get Ticket Departments
----------------------

[](#get-ticket-departments)

*Get a list of ticket queues by department.*

```
    $thgHostingClient->getTicketDepartments();
```

Get Ticket Details
------------------

[](#get-ticket-details)

*Get the details of a specified support ticket.*

```
    $thgHostingClient->getTicketDetails(
        int $ticketId // ID of the ticket (see “Get Tickets”)
    );
```

Update Ticket
-------------

[](#update-ticket)

*Update status of existing support ticket.*

```
    $thgHostingClient->updateTicket(
        int  $ticketId,           // ID of the ticket (see “Get Tickets”)
        int  $priority    = 0,    // Priority of a Ticket (Default: 0 = Low, 1= Normal, 2 = High, 3 = Urgent)
        bool $closeTicket = false // Set to true will close the ticket
    );
```

Add Reply to Ticket
-------------------

[](#add-reply-to-ticket)

*Add reply to a specific support ticket.*

```
    $thgHostingClient->addReplyToTicket(
        int    $ticketId,        // ID of the ticket (see “Get Tickets”)
        string $body,            // Ticket body
        array  $attachments = [] // How to attach files you can find described in `request` method
    );
```

Get Status Updates
------------------

[](#get-status-updates)

*Get a list of active status updates.*

```
    $thgHostingClient->getStatusUpdates();
```

Get Billing Services
--------------------

[](#get-billing-services)

*Returns customer services.*

```
    $thgHostingClient->getBillingServices(
        ?bool $showAddOns,  //Show the add-ons belonging to each service
        ?string $sortBy,    //Sort by column (service_id/createdon)
        ?string $direction, //Sort direction (default asc)
        ?int $offset,       //If set, returns records starting from this offset
        ?int $limit         //If set, limits the number of records
    );
```

Get Billing Invoices
--------------------

[](#get-billing-invoices)

*Returns customer invoices.*

```
    $thgHostingClient->getBillingInvoices(
        ?int $offset,       //If set, returns records starting from this offset
        ?int $limit         //If set, limits the number of records
    );
```

Get Microsoft Licenses
----------------------

[](#get-microsoft-licenses)

*Returns Microsoft Licenses*

```
    $thgHostingClient->getMicrosoftLicenses(
        int $serviceId,      // Server service ID to get a list of licenses
    );
```

Get Microsoft License Details
-----------------------------

[](#get-microsoft-license-details)

*Returns Microsoft License Details*

```
    $thgHostingClient->getMicrosoftLicenseDetails(
        int $serviceId,      // Server service ID for retrieving of an MS license details which belongs to
        int $licenseId,      // License ID to get an MS license details
    );
```

Delete Microsoft License
------------------------

[](#delete-microsoft-license)

*Deletes a Microsoft License*

```
    $thgHostingClient->deleteMicrosoftLicense(
        int $serviceId,      // Server service ID for deleting of an MS license which belongs to
        int $licenseId,      // License ID to delete
    );
```

Get Available Microsoft License Products
----------------------------------------

[](#get-available-microsoft-license-products)

*Returns A List Of Microsoft License Products*

```
    $thgHostingClient->getMicrosoftLicenseProducts(
        int $serviceId,      // Server service ID to get a list of license products
    );
```

List SSH keys Data
------------------

[](#list-ssh-keys-data)

*Returns A List Of SSH Keys*

```
    $thgHostingClient->listSshKeys();
```

Add An SSH Key
--------------

[](#add-an-ssh-key)

*Creates New SSH Key Record*

```
    $thgHostingClient->createSshKey(
        string $key,        // Public RSA Key to be stored
        string $label,      // Label for SSH Key
    );
```

Update Label For An Existing SSH Key
------------------------------------

[](#update-label-for-an-existing-ssh-key)

*Updates Label For SSH Key Given Id*

```
    $thgHostingClient->updateSshKeyLabel(
        int $sshId,         // The ID for the SSH Key to be updated
        string $label,      // The new label for the SSH Key
    );
```

Delete An SSH Key
-----------------

[](#delete-an-ssh-key)

*Delete An SSH Key Of The Given Id*

```
    $thgHostingClient->deleteSshKey(
        int $sshId,         // The ID of the SSH Key to be deleted
    );
    );
```

Get An SSH Key With Id
----------------------

[](#get-an-ssh-key-with-id)

*Returns An SSH Key Given Id*

```
    $thgHostingClient->getSshKeyById(
        int $sshId,      // The ID of the SSH Key to be fetched
    );
```

Get list of server inventory
----------------------------

[](#get-list-of-server-inventory)

*Returns server inventory list*

```
    $thgHostingClient->getServerInventory(
        ?int $datacenterId = null,
        ?string $cpuBrand = null,
        ?int $minCpuCores = null,
        ?int $maxCpuCores = null,
        ?float $minCpuSpeed = null,
        ?float $maxCpuSpeed = null,
        ?int $minRam = null,
        ?int $maxRam = null,
        ?string $storageType = null,
        ?int $minStorage = null,
        ?int $maxStorage = null,
        ?int $minNic = null,
        ?int $maxNic = null,
        ?float $minPrice = null,
        ?float $maxPrice = null,
        ?bool $raidEnabled = null,
        ?string $sortBy = null,
        ?string $direction = null
    );
```

Create new bare metal server order
==================================

[](#create-new-bare-metal-server-order)

*Creates new bare metal server order*

```
    $thgHostingClient->createBareMetalServerOrder(
        string $skuProductName,
        int $quantity,
        string $locationCode,
        string $operatingSystemProductCode,      //Find available OS product codes by calling the list addons endpoint
        ?string $licenseProductCode = null,      //Find available license product codes by calling the list addons endpoint
        ?int $additionalBandwidthTb = null,
        ?string $supportLevelProductCode = null, //Find available managed support product codes by calling the list addons endpoint
        ?array $sshKeyIds = null                 //Add ssh keys to the server.
    );
```

List Available addons for bare metal server order
=================================================

[](#list-available-addons-for-bare-metal-server-order)

*Returns list of all available addons for a bare metal server*

```
    $thgHostingClient->listAvailableBareMetalAddons(
        string $skuProductName,
        string $locationCode
    );
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance41

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity62

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

Recently: every ~51 days

Total

14

Last Release

499d ago

Major Versions

1.4.3 → 2.0.02025-02-20

PHP version history (2 changes)1.0.0PHP &gt;=7.2.34

1.3.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/79470d7b5e0dc29ff8a7236e1269075636797121fdb2c54cc26ef2a22f2081b6?d=identicon)[THG Hosting](/maintainers/THG%20Hosting)

![](https://avatars.githubusercontent.com/u/1804524?v=4)[Peter Uhlich](/maintainers/peter-uhlich)[@peter-uhlich](https://github.com/peter-uhlich)

![](https://avatars.githubusercontent.com/u/106229487?v=4)[kishorejat](/maintainers/kishorejat)[@kishorejat](https://github.com/kishorejat)

---

Top Contributors

[![billyspringsteen](https://avatars.githubusercontent.com/u/49392048?v=4)](https://github.com/billyspringsteen "billyspringsteen (23 commits)")[![puhlich](https://avatars.githubusercontent.com/u/1566531?v=4)](https://github.com/puhlich "puhlich (21 commits)")[![andy-lu-42](https://avatars.githubusercontent.com/u/109291528?v=4)](https://github.com/andy-lu-42 "andy-lu-42 (12 commits)")[![thg-bansalg](https://avatars.githubusercontent.com/u/87427608?v=4)](https://github.com/thg-bansalg "thg-bansalg (12 commits)")[![nhanguyen](https://avatars.githubusercontent.com/u/1225166?v=4)](https://github.com/nhanguyen "nhanguyen (7 commits)")[![peter-uhlich](https://avatars.githubusercontent.com/u/1804524?v=4)](https://github.com/peter-uhlich "peter-uhlich (7 commits)")[![FrostiaKk](https://avatars.githubusercontent.com/u/60479225?v=4)](https://github.com/FrostiaKk "FrostiaKk (3 commits)")[![Mortimer333](https://avatars.githubusercontent.com/u/34005580?v=4)](https://github.com/Mortimer333 "Mortimer333 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thg-thg-client/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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