PHPackages                             upcloudltd/upcloud-php-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. upcloudltd/upcloud-php-api

ActiveLibrary[API Development](/categories/api)

upcloudltd/upcloud-php-api
==========================

UpCloud PHP API

v3.0.0(2y ago)2422.0k↓58.3%18[3 issues](https://github.com/UpCloudLtd/upcloud-php-api/issues)MITPHPPHP ^8.0

Since Jan 16Pushed 2y ago13 watchersCompare

[ Source](https://github.com/UpCloudLtd/upcloud-php-api)[ Packagist](https://packagist.org/packages/upcloudltd/upcloud-php-api)[ Docs](https://github.com/UpCloudLtd/upcloud-php-api)[ RSS](/packages/upcloudltd-upcloud-php-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (8)Versions (13)Used By (0)

UpCloud PHP API client library
==============================

[](#upcloud-php-api-client-library)

[![UpCloud php api test](https://github.com/UpCloudLtd/upcloud-php-api/workflows/UpCloud%20php%20api%20test/badge.svg)](https://github.com/UpCloudLtd/upcloud-php-api/workflows/UpCloud%20php%20api%20test/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/e57f19fad2125f71095f00f08d8cf658a1ae2bdd5a3e1a04ceff1c6f513f1857/68747470733a2f2f706f7365722e707567782e6f72672f7570636c6f75646c74642f7570636c6f75642d7068702d6170692f762f737461626c65)](https://packagist.org/packages/upcloudltd/upcloud-php-api)[![License](https://camo.githubusercontent.com/86b4b07c9e27a089093539e0f6c335842555b56b1997a9c9df7ea2019fdc3306/68747470733a2f2f706f7365722e707567782e6f72672f7570636c6f75646c74642f7570636c6f75642d7068702d6170692f6c6963656e7365)](https://packagist.org/packages/upcloudltd/upcloud-php-api)[![Total Downloads](https://camo.githubusercontent.com/763b9a3bcc30b2b71564d8f5835644599dc54218d9916c1ecc838b05fcd7f6d8/68747470733a2f2f706f7365722e707567782e6f72672f7570636c6f75646c74642f7570636c6f75642d7068702d6170692f646f776e6c6f616473)](https://packagist.org/packages/upcloudltd/upcloud-php-api)

This PHP API client library provides integration with the UpCloud API allowing operations used to manage resources on UpCloud. The client is a web service interface that uses HTTPS to connect to the API. The API follows the principles of a RESTful web service wherever possible.

The base URL for all API operations is  and require basic authentication using UpCloud username and password. We recommend [creating a subaccount](https://www.upcloud.com/support/server-tags-and-group-accounts/) dedicated for the API communication for security purposes. This allows you to restrict API access by servers, storages, and tags ensuring you will never accidentally affect critical systems.

NOTE: Please test all of your use cases thoroughly before actual production use. Using a separate UpCloud account for testing / developing the client is recommended.

Table of content
----------------

[](#table-of-content)

- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Issues](#issues)
- [License](#license)

Requirements
------------

[](#requirements)

Using this library requires the PHP version 8.0 and later.

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

[](#installation)

### Composer

[](#composer)

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
  "require": {
    "upcloudltd/upcloud-php-api": "v2.0.0"
  }
}

```

Then run `composer install`

The upcloudltd/upcloud-php-api can be found from packagist.org,

### Manual installation

[](#manual-installation)

Download the files and include `autoload.php`:

```
    require_once('/path/to//vendor/autoload.php');
```

Tests
-----

[](#tests)

To run the unit tests:

```
composer install

./vendor/bin/phpunit

```

Usage
-----

[](#usage)

Please follow the [installation procedure](#installation--usage) and then run the following (**NOTE**: In real production applications you should use for example ENV variables instead of inserting credentials directly to code and to version control):

```
