All URIs are relative to https://api.contabo.com, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
cancelInstance() | POST /v1/compute/instances/{instanceId}/cancel | Cancel specific instance by id |
createInstance() | POST /v1/compute/instances | Create a new instance |
patchInstance() | PATCH /v1/compute/instances/{instanceId} | Update specific instance |
reinstallInstance() | PUT /v1/compute/instances/{instanceId} | Reinstall specific instance |
retrieveInstance() | GET /v1/compute/instances/{instanceId} | Get specific instance by id |
retrieveInstancesList() | GET /v1/compute/instances | List instances |
upgradeInstance() | POST /v1/compute/instances/{instanceId}/upgrade | Upgrading instance capabilities |
cancelInstance($x_request_id, $instance_id, $x_trace_id): \OpenAPI\Client\Model\CancelInstanceResponse
Cancel specific instance by id
Your are free to cancel a previously created instance at any time.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the instance
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.
try {
$result = $apiInstance->cancelInstance($x_request_id, $instance_id, $x_trace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstancesApi->cancelInstance: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | string | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
instance_id | int | The identifier of the instance | |
x_trace_id | string | Identifier to trace group of requests. | [optional] |
\OpenAPI\Client\Model\CancelInstanceResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createInstance($x_request_id, $create_instance_request, $x_trace_id): \OpenAPI\Client\Model\CreateInstanceResponse
Create a new instance
Create a new instance for your account with the provided parameters.
ProductId | Product | Disk Size |
---|---|---|
V45 | VPS 1 SSD | 400 GB SSD |
V47 | VPS 1 Storage | 800 GB SSD |
V46 | VPS 1 NVMe | 100 GB NVMe |
V48 | VPS 2 SSD | 400 GB SSD |
V50 | VPS 2 Storage | 800 GB SSD |
V49 | VPS 2 NVMe | 200 GB NVMe |
V51 | VPS 3 SSD | 1200 GB SSD |
V53 | VPS 3 Storage | 2400 GB SSD |
V52 | VPS 3 NVMe | 300 GB NVMe |
V54 | VPS 4 SSD | 1600 GB SSD |
V56 | VPS 4 Storage | 3200 GB SSD |
V55 | VPS 4 NVMe | 400 GB NVMe |
V57 | VPS 5 SSD | 2000 GB SSD |
V59 | VPS 5 Storage | 4000 GB SSD |
V58 | VPS 5 NVMe | 500 GB NVMe |
V60 | VPS 6 SSD | 2400 GB SSD |
V62 | VPS 6 Storage | 4800 GB SSD |
V61 | VPS 6 NVMe | 600 GB NVMe |
V8 | VDS S | 180 GB NVMe |
V9 | VDS M | 240 GB NVMe |
V10 | VDS L | 360 GB NVMe |
V11 | VDS XL | 480 GB NVMe |
V16 | VDS XXL | 720 GB NVMe |
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$create_instance_request = new \OpenAPI\Client\Model\CreateInstanceRequest(); // \OpenAPI\Client\Model\CreateInstanceRequest
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.
try {
$result = $apiInstance->createInstance($x_request_id, $create_instance_request, $x_trace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstancesApi->createInstance: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | string | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
create_instance_request | \OpenAPI\Client\Model\CreateInstanceRequest | ||
x_trace_id | string | Identifier to trace group of requests. | [optional] |
\OpenAPI\Client\Model\CreateInstanceResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
patchInstance($x_request_id, $instance_id, $patch_instance_request, $x_trace_id): \OpenAPI\Client\Model\PatchInstanceResponse
Update specific instance
Update specific instance by instanceId.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the instance
$patch_instance_request = new \OpenAPI\Client\Model\PatchInstanceRequest(); // \OpenAPI\Client\Model\PatchInstanceRequest
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.
try {
$result = $apiInstance->patchInstance($x_request_id, $instance_id, $patch_instance_request, $x_trace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstancesApi->patchInstance: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | string | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
instance_id | int | The identifier of the instance | |
patch_instance_request | \OpenAPI\Client\Model\PatchInstanceRequest | ||
x_trace_id | string | Identifier to trace group of requests. | [optional] |
\OpenAPI\Client\Model\PatchInstanceResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
reinstallInstance($x_request_id, $instance_id, $reinstall_instance_request, $x_trace_id): \OpenAPI\Client\Model\ReinstallInstanceResponse
Reinstall specific instance
You can reinstall a specific instance with a new image and optionally add ssh keys, a root password or cloud-init.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the instance
$reinstall_instance_request = new \OpenAPI\Client\Model\ReinstallInstanceRequest(); // \OpenAPI\Client\Model\ReinstallInstanceRequest
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.
try {
$result = $apiInstance->reinstallInstance($x_request_id, $instance_id, $reinstall_instance_request, $x_trace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstancesApi->reinstallInstance: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | string | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
instance_id | int | The identifier of the instance | |
reinstall_instance_request | \OpenAPI\Client\Model\ReinstallInstanceRequest | ||
x_trace_id | string | Identifier to trace group of requests. | [optional] |
\OpenAPI\Client\Model\ReinstallInstanceResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
retrieveInstance($x_request_id, $instance_id, $x_trace_id): \OpenAPI\Client\Model\FindInstanceResponse
Get specific instance by id
Get attributes values to a specific instance on your account.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the instance
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.
try {
$result = $apiInstance->retrieveInstance($x_request_id, $instance_id, $x_trace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstancesApi->retrieveInstance: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | string | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
instance_id | int | The identifier of the instance | |
x_trace_id | string | Identifier to trace group of requests. | [optional] |
\OpenAPI\Client\Model\FindInstanceResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
retrieveInstancesList($x_request_id, $x_trace_id, $page, $size, $order_by, $name, $display_name, $data_center, $region, $instance_id, $instance_ids, $status, $add_on_ids, $product_types, $ip_config, $search): \OpenAPI\Client\Model\ListInstancesResponse
List instances
List and filter all instances in your account
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.
$page = 1; // int | Number of page to be fetched.
$size = 10; // int | Number of elements per page.
$order_by = name:asc; // string[] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.
$name = vmd12345; // string | The name of the instance
$display_name = myTestInstance; // string | The display name of the instance
$data_center = European Union 1; // string | The data center of the instance
$region = EU; // string | The Region of the instance
$instance_id = 100; // int | The identifier of the instance (deprecated)
$instance_ids = 100, 101, 102; // string | Comma separated instances identifiers
$status = provisioning,installing; // string | The status of the instance
$add_on_ids = 1044,827; // string | Identifiers of Addons the instances have
$product_types = ssd, hdd, nvme; // string | Comma separated instance's category depending on Product Id
$ip_config = true; // bool | Filter instances that have an ip config
$search = vmd12345; // string | Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress`
try {
$result = $apiInstance->retrieveInstancesList($x_request_id, $x_trace_id, $page, $size, $order_by, $name, $display_name, $data_center, $region, $instance_id, $instance_ids, $status, $add_on_ids, $product_types, $ip_config, $search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstancesApi->retrieveInstancesList: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | string | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
x_trace_id | string | Identifier to trace group of requests. | [optional] |
page | int | Number of page to be fetched. | [optional] |
size | int | Number of elements per page. | [optional] |
order_by | string[] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC | DESC`. |
name | string | The name of the instance | [optional] |
display_name | string | The display name of the instance | [optional] |
data_center | string | The data center of the instance | [optional] |
region | string | The Region of the instance | [optional] |
instance_id | int | The identifier of the instance (deprecated) | [optional] |
instance_ids | string | Comma separated instances identifiers | [optional] |
status | string | The status of the instance | [optional] |
add_on_ids | string | Identifiers of Addons the instances have | [optional] |
product_types | string | Comma separated instance's category depending on Product Id | [optional] |
ip_config | bool | Filter instances that have an ip config | [optional] |
search | string | Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` | [optional] |
\OpenAPI\Client\Model\ListInstancesResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
upgradeInstance($x_request_id, $instance_id, $upgrade_instance_request, $x_trace_id): \OpenAPI\Client\Model\PatchInstanceResponse
Upgrading instance capabilities
In order to enhance your instance with additional features you can purchase add-ons. Currently only firewalling and private network addon is allowed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the instance
$upgrade_instance_request = new \OpenAPI\Client\Model\UpgradeInstanceRequest(); // \OpenAPI\Client\Model\UpgradeInstanceRequest
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.
try {
$result = $apiInstance->upgradeInstance($x_request_id, $instance_id, $upgrade_instance_request, $x_trace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstancesApi->upgradeInstance: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | string | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
instance_id | int | The identifier of the instance | |
upgrade_instance_request | \OpenAPI\Client\Model\UpgradeInstanceRequest | ||
x_trace_id | string | Identifier to trace group of requests. | [optional] |
\OpenAPI\Client\Model\PatchInstanceResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]