PHPackages                             sandwave-io/cloud-sdk-php - 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. sandwave-io/cloud-sdk-php

AbandonedArchivedLibrary[API Development](/categories/api)

sandwave-io/cloud-sdk-php
=========================

PCextreme API Cloud SDK

0.4.6(4y ago)33.9kproprietaryPHPPHP &gt;=8.0

Since May 14Pushed 1y ago4 watchersCompare

[ Source](https://github.com/sandwave-io/cloud-sdk-php)[ Packagist](https://packagist.org/packages/sandwave-io/cloud-sdk-php)[ RSS](/packages/sandwave-io-cloud-sdk-php/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (9)Versions (24)Used By (0)

[![](https://user-images.githubusercontent.com/60096509/91668964-54ecd500-eb11-11ea-9c35-e8f0b20b277a.png)](https://sandwave.io)

PCextreme Cloud API - PHP SDK
=============================

[](#pcextreme-cloud-api---php-sdk)

[![Codecov](https://camo.githubusercontent.com/e5001eb7af2068a1f07046bf56331f316104e43b9bfb953e230ddf24f8f14b16/68747470733a2f2f636f6465636f762e696f2f67682f73616e64776176652d696f2f636c6f75642d73646b2d7068702f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d435757494657524b5a43)](https://packagist.org/packages/sandwave-io/cloud-sdk-php)[![GitHub Workflow Status](https://camo.githubusercontent.com/a6f1a77f30553d3debd9893d7822fabb20a02e081833c377b0c1dadbff3eb76e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616e64776176652d696f2f636c6f75642d73646b2d7068702f63692e796d6c3f6272616e63683d6d61696e)](https://packagist.org/packages/sandwave-io/cloud-sdk-php)[![Packagist PHP Version Support](https://camo.githubusercontent.com/ea6c90f4fdffa095d5e524e80bcc1f5fb2aadf28b705ab840cbb85427fe35a0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73616e64776176652d696f2f636c6f75642d73646b2d706870)](https://packagist.org/packages/sandwave-io/cloud-sdk-php)[![Packagist PHP Version Support](https://camo.githubusercontent.com/35a9bcd140c25f272756be328c2ab14f612531ef6fd5189ced4ea3e7d4329278/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616e64776176652d696f2f636c6f75642d73646b2d706870)](https://packagist.org/packages/sandwave-io/cloud-sdk-php)[![Packagist Downloads](https://camo.githubusercontent.com/29aaf0821f8dc9eb8eb4665fd48c1452dfbe003d0fdf39dbcac6ee807d01171e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616e64776176652d696f2f636c6f75642d73646b2d706870)](https://packagist.org/packages/sandwave-io/cloud-sdk-php)

How to contribute
-----------------

[](#how-to-contribute)

Feel free to create a PR if you have any ideas for improvements. Or create an issue.

- When adding code, make sure to add tests for it (phpunit).
- Make sure the code adheres to our coding standards (use php-cs-fixer to check/fix).
- Also make sure PHPStan does not find any bugs.

```
vendor/bin/php-cs-fixer fix

vendor/bin/phpstan analyze

vendor/bin/phpunit --coverage-text
```

These tools will also run in GitHub actions on PR's and pushes on master.

Usage
-----

[](#usage)

```
use PCextreme\CloudSdkPhp\CloudSdk;

$cloudSdk = new CloudSdk('your-pcextreme-api-key', 'your-pcextreme-account-uuid');

$cloudSdk->listServers(); // list all servers under your account
```

### Available methods

[](#available-methods)

The endpoints that are currently implemented are not all existing endpoints. If you need an other endpoint to be implemented, create an issue or open a PR. 🙂

- [Deploy server](#deploy-server)
- [List servers](#list-servers)
- [Show server](#show-server)
- [Server details](#server-details)
- [Upgrade server](#upgrade-server)
- [Upgrade server](#reset-server)
- [Detach rescue ISO server](#detach-rescue-iso-server)
- [Attach rescue ISO server](#attach-rescue-iso-server)
- [Reboot server](#reboot-server)
- [Start server](#start-server)
- [Stop server](#stop-server)
- [Delete server](#delete-server)
- [Get current RAM usage for account](#get-current-ram-usage-for-account)

#### Deploy server

[](#deploy-server)

```
$cloudSdk->deployServer(
    'example.com',
    'SuperSecretPassword',
    'pcexterme-offer-uuid', // check the listOffers method to get this id.
    'pcexterme-template-uuid', // check the listTemplates method to get this id.
    'pcexterme-datacenter-uuid' // check the listDatacenters method to get this id.
);
```

This will return the ID of the created server:

```
[
    'id' => 'aaaa-bbbb-cccc-dddd-eeee'
]
```

#### List servers

[](#list-servers)

```
$cloudSdk->listServers();
```

This will return an array having all servers attached to your account.

```
[
    [
        'id'                    => 'aaaa-bbbb-cccc-dddd-eeee',
        'display_name'          => 'display_name',
        'status'                => 'Running',
        'rescue_iso_attached'   => false,
        'has_security_group'    => true,

        'created_at'            => '2020-04-02T09:50:13+00:00',
        'updated_at'            => '2020-04-02T09:50:13+00:00',
    ],
];
```

#### Show server

[](#show-server)

You can also check out a specific server.

```
$cloudSdk->showServer('aaaa-bbbb-cccc-dddd-eeee');
```

```
[
    'id'                    => 'aaaa-bbbb-cccc-dddd-eeee',
    'display_name'          => 'display_name',
    'status'                => 'Running',
    'rescue_iso_attached'   => false,
    'has_security_group'    => true,

    'created_at'            => '2020-04-02T09:50:13+00:00',
    'updated_at'            => '2020-04-02T09:50:13+00:00',
];
```

#### Server details

[](#server-details)

You could use this call to fetch data from the underlying Cloudstack system.

```
$cloudSdk->showDetails('aaaa-bbbb-cccc-dddd-eeee');
```

Check out [the cloudstack docs](https://cloudstack.apache.org/api/apidocs-4.12/apis/listVirtualMachines.html) to see all the available information.

```
[
    "id"        => "aaaa-bbbb-cccc-dddd-eeee",
    "name"      => "aaaa-bbbb-cccc-dddd-eeee",
    "displayname" => "Name",
    "account" => "3",
    "userid" => "ad09ecc3-0356-4fva-ab42-d3dee2b08d82",
    "username" => "3",
    "domainid" => "6f243d98-7f2f-4276-9381-68e2a76f8b33",
    "domain" => "3",
    "created" => "2019-12-04T10:10:28+0100",
    "state" => "Running",
    "haenable" => false,
    "zoneid" => "10c85e3a-b499-4b73-a78d-f2f48ca2a3ba",
    "zonename" => "zone03.ams02.cldin.net",
    "templateid" => "50ea3730-6cf4-47c2-9663-387d16fa8c72",
    "templatename" => "Ubuntu 18.04.2",
    "templatedisplaytext" => "Ubuntu 18.04.2 20GB",
    "passwordenabled" => true,
    "serviceofferingid" => "53a3b7ab-8f9f-4ee1-b289-db70a29168aa",
    "serviceofferingname" => "pcx_standard_custom",
    "cpunumber" => 16,
    "cpuspeed" => 2000,
    "memory" => 65536,
    "cpuused" => "0.11%",
    "networkkbsread" => 898116,
    "networkkbswrite" => 40097,
    "diskkbsread" => 672,
    "diskkbswrite" => 4583328,
    "memorykbs" => 67108864,
    "memoryintfreekbs" => 67005920,
    "memorytargetkbs" => 67108864,
    "diskioread" => 168,
    "diskiowrite" => 346239,
    "guestosid" => "4ba6aae8-a4a1-11e9-814e-5254000588f7",
    "rootdeviceid" => 0,
    "rootdevicetype" => "ROOT",
    "securitygroup" => [
        [
            "id" => "a259a05b-8ea8-4fb0-97fb-9735261de5cb",
            "name" => "epic-vm","account" => "3",
            "ingressrule" => [],
            "egressrule" => [],
            "tags" => [],
            "virtualmachineids" => [],
        ],
    ],
    "nic" => [
        [
            "id" => "b707be76-7f82-44d0-b900-9fbdaba591bc",
            "networkid" => "a0234ec3-bdb6-46b8-80a1-37144d7c3928",
            "networkname" => "Guest Network 1",
            "netmask" => "255.255.255.0",
            "gateway" => "185.109.216.3",
            "ipaddress" => "185.109.216.118",
            "isolationuri" => "vxlan:\/\/500",
            "broadcasturi" => "vxlan:\/\/500",
            "traffictype" => "Guest",
            "type" => "Shared",
            "isdefault" => true,
            "macaddress" => "1e:00:1f:00:00:72",
            "ip6gateway" => "2a05:1500:600::1",
            "ip6cidr" => "2a05:1500:600::\/64",
            "ip6address" => "2a05:1500:600:0:1c00:1fff:fe00:72",
            "secondaryip" => [],
            "extradhcpoption" => [],
        ]
    ],
    "hypervisor" => "KVM",
    "details" => [
        "cpuNumber" => "16",
        "memory" => "65536",
        "cpuSpeed" => "2000",
        "memoryOvercommitRatio" => "1.0",
        "cpuOvercommitRatio" => "4.0",
        "rootdisksize" => "1280",
        "rootDiskController" => "scsi"
    ],
    "affinitygroup" => [],
    "isdynamicallyscalable" => true,
    "ostypeid" => "4ba6aae8-a4a1-11e9-814e-5254000588f7",
    "tags" => []
];
```

#### Upgrade server

[](#upgrade-server)

In the case that you want to upgrade an existing server, you can use upgradeServer.

Note that the VM must be stopped when you run this.

```
$cloudSdk->upgradeServer(
    'aaaa-bbbb-cccc-dddd-eeee',
    'pcexterme-offer-uuid' // check the listOffers method to get this id.
);
```

#### Reset server

[](#reset-server)

```
$cloudSdk->resetServer('aaaa-bbbb-cccc-dddd-eeee');
```

#### Detach rescue ISO server

[](#detach-rescue-iso-server)

Rescue ISO's can be used to salvage a broken server.

```
$cloudSdk->detachRescueIso('aaaa-bbbb-cccc-dddd-eeee');
```

#### Attach rescue ISO server

[](#attach-rescue-iso-server)

Rescue ISO's can be used to salvage a broken server.

```
$cloudSdk->detachRescueIso('aaaa-bbbb-cccc-dddd-eeee');
```

#### Edit display name server

[](#edit-display-name-server)

```
$cloudSdk->updateServerHostname(
    'aaaa-bbbb-cccc-dddd-eeee',
    'hostname',
);
```

#### Reboot server

[](#reboot-server)

```
$cloudSdk->rebootServer('aaaa-bbbb-cccc-dddd-eeee');
```

#### Start server

[](#start-server)

```
$cloudSdk->startServer('aaaa-bbbb-cccc-dddd-eeee');
```

#### Stop server

[](#stop-server)

```
$cloudSdk->stopServer('aaaa-bbbb-cccc-dddd-eeee');
```

#### Delete server

[](#delete-server)

```
$cloudSdk->deleteServer('aaaa-bbbb-cccc-dddd-eeee');
```

Note: there is a grace period within Cloudstack. So the data will not be immediately lost.

#### Get current RAM usage for account

[](#get-current-ram-usage-for-account)

Accounts are limited on resources by default. You can retrieve your current resource usage using this method.

If you wish to broaden your limits, contact PCextreme.

```
$cloudSdk->getUsage();
```

```
[
    'ram' => 1 // in GB's
];
```

#### Get offers for account

[](#get-offers-for-account)

Before you deploy or upgrade a server, you must retrieve the offer ID that you want to use.

```
$cloudSdk->listOffers();
```

```
[
    [
        'id'                 => 'aaaa-bbbb-cccc-dddd-eeee',
        'account_id'         => null, // Contains your account ID in the case of a custom offering.
        'billing_period'     => 12, // Billing period in months
        'price'              => 9990, // Price in cents.
        'type'               => 'usage',
        'sku'                => 'compute_standard_2gb',
        'name'               => 'server',
        'description'        => 'server',
        'show_in_store'      => 0,
        'specifications'     => [
            // Filled with specifications depending on the offering.
        ],

        'created_at'         => '2020-04-02T09:50:13+00:00',
        'updated_at'         => '2020-04-02T09:50:13+00:00',
    ]
];
```

#### Get datacenters for account

[](#get-datacenters-for-account)

For a deployment, you also need to know what datacenter to deploy in.

```
$cloudSdk->listDatacenters();
```

The response also contains the availability of standard and HA VM's. These are two different types of storage, the difference between the two VM's can also be identified based on the offer data.

```
[
    [
        'id'            => 'aaaa-bbbb-cccc-dddd-eeee',
        'name'          => 'ams01',
        'description'   => 'Amsterdam',
        'city'          => 'ams',
        'country'       => 'nl',
        'timezone'      => 'Europe/Amsterdam',
        'standard_enabled'  => true,
        'ha_enabled'        => true
    ]
];
```

#### Get templates for account

[](#get-templates-for-account)

The templates used for VM deployments are predefined and can be seen using listTemplates.

```
$cloudSdk->listTemplates();
```

```
[
    [
        'id'            => 'aaaa-bbbb-cccc-dddd-eeee',
        'display_name'  => 'Fedora 30',
        'os'            => 'fedora',
        'version'       => 30,
        'created_at'    => '2020-04-02T09:50:13+00:00',
        'updated_at'    => '2020-04-02T09:50:13+00:00'
    ]
];
```

#### Get private networks for account

[](#get-private-networks-for-account)

The templates used for VM deployments are predefined and can be seen using listTemplates.

```
$cloudSdk->listNetworks();
```

```
[
    [
        "id" => "d11c06f5-ff1c-41cd-8fc9-1ebcb3084501",
        "display_name" => "An example (No SG)",
        "datacenter_id" => "36616598-8e93-4118-a03c-94f99e5e1169",
        "manager" => "man.zone03.ams02.cldin.net",
        "cidr_ipv4" => "185.109.217.64/26",
        "cidr_ipv6" => "2a05:1500:600:4::/64",
        "created_at" => "2019-09-09T08:58:05+00:00",
        "updated_at" => "2019-09-09T08:58:05+00:00"
    ]
];
```

#### Get console url for current sever

[](#get-console-url-for-current-sever)

If you wish to open a browser based console, you can use this method to generate a URL.

```
$cloudSdk->getConsoleUrl();
```

```
[
    'url' => 'www.test.nl'
];
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 57.9% 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 ~40 days

Recently: every ~117 days

Total

16

Last Release

1589d ago

PHP version history (2 changes)0.2.0PHP ^7.1

v0.4.5PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16303480?v=4)[Jesse Kramer](/maintainers/FrontEndCoffee)[@FrontEndCoffee](https://github.com/FrontEndCoffee)

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

---

Top Contributors

[![FrontEndCoffee](https://avatars.githubusercontent.com/u/16303480?v=4)](https://github.com/FrontEndCoffee "FrontEndCoffee (55 commits)")[![tristanlinnenbank](https://avatars.githubusercontent.com/u/49492607?v=4)](https://github.com/tristanlinnenbank "tristanlinnenbank (29 commits)")[![paulsandwavebot](https://avatars.githubusercontent.com/u/181111594?v=4)](https://github.com/paulsandwavebot "paulsandwavebot (3 commits)")[![stephanvdhorn](https://avatars.githubusercontent.com/u/59826710?v=4)](https://github.com/stephanvdhorn "stephanvdhorn (3 commits)")[![A1rPun](https://avatars.githubusercontent.com/u/3754692?v=4)](https://github.com/A1rPun "A1rPun (1 commits)")[![radriaanse](https://avatars.githubusercontent.com/u/5745445?v=4)](https://github.com/radriaanse "radriaanse (1 commits)")[![lesleydesmet](https://avatars.githubusercontent.com/u/14326742?v=4)](https://github.com/lesleydesmet "lesleydesmet (1 commits)")[![ThomasRedpanda](https://avatars.githubusercontent.com/u/48917857?v=4)](https://github.com/ThomasRedpanda "ThomasRedpanda (1 commits)")[![markdingemanse](https://avatars.githubusercontent.com/u/5897369?v=4)](https://github.com/markdingemanse "markdingemanse (1 commits)")

---

Tags

sdkcomputepcextremeservers

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sandwave-io-cloud-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/sandwave-io-cloud-sdk-php/health.svg)](https://phpackages.com/packages/sandwave-io-cloud-sdk-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)

PHPackages © 2026

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