All URIs are relative to https://api.contabo.com
Method | HTTP request | Description |
---|---|---|
cancel_instance | POST /v1/compute/instances/{instanceId}/cancel | Cancel specific instance by id |
create_instance | POST /v1/compute/instances | Create a new instance |
patch_instance | PATCH /v1/compute/instances/{instanceId} | Update specific instance |
reinstall_instance | PUT /v1/compute/instances/{instanceId} | Reinstall specific instance |
retrieve_instance | GET /v1/compute/instances/{instanceId} | Get specific instance by id |
retrieve_instances_list | GET /v1/compute/instances | List instances |
upgrade_instance | POST /v1/compute/instances/{instanceId}/upgrade | Upgrading instance capabilities |
CancelInstanceResponse cancel_instance(x_request_id, instance_id, body, x_trace_id=x_trace_id)
Cancel specific instance by id
Your are free to cancel a previously created instance at any time.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.cancel_instance_response import CancelInstanceResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.InstancesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [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
body = None # object |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Cancel specific instance by id
api_response = api_instance.cancel_instance(x_request_id, instance_id, body, x_trace_id=x_trace_id)
print("The response of InstancesApi->cancel_instance:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InstancesApi->cancel_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
instance_id | int | The identifier of the instance | |
body | object | ||
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | The response will be a JSON object and contains standard custom image attributes | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateInstanceResponse create_instance(x_request_id, create_instance_request, x_trace_id=x_trace_id)
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 |
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.create_instance_request import CreateInstanceRequest
from pfruck_contabo.models.create_instance_response import CreateInstanceResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.InstancesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [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 = pfruck_contabo.CreateInstanceRequest() # CreateInstanceRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Create a new instance
api_response = api_instance.create_instance(x_request_id, create_instance_request, x_trace_id=x_trace_id)
print("The response of InstancesApi->create_instance:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InstancesApi->create_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
create_instance_request | CreateInstanceRequest | ||
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | The response will be a JSON object and contains standard instance attributes. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PatchInstanceResponse patch_instance(x_request_id, instance_id, patch_instance_request, x_trace_id=x_trace_id)
Update specific instance
Update specific instance by instanceId.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.patch_instance_request import PatchInstanceRequest
from pfruck_contabo.models.patch_instance_response import PatchInstanceResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.InstancesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [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 = pfruck_contabo.PatchInstanceRequest() # PatchInstanceRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Update specific instance
api_response = api_instance.patch_instance(x_request_id, instance_id, patch_instance_request, x_trace_id=x_trace_id)
print("The response of InstancesApi->patch_instance:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InstancesApi->patch_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | 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 | PatchInstanceRequest | ||
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains instanceId and createdDate. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReinstallInstanceResponse reinstall_instance(x_request_id, instance_id, reinstall_instance_request, x_trace_id=x_trace_id)
Reinstall specific instance
You can reinstall a specific instance with a new image and optionally add ssh keys, a root password or cloud-init.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.reinstall_instance_request import ReinstallInstanceRequest
from pfruck_contabo.models.reinstall_instance_response import ReinstallInstanceResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.InstancesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [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 = pfruck_contabo.ReinstallInstanceRequest() # ReinstallInstanceRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Reinstall specific instance
api_response = api_instance.reinstall_instance(x_request_id, instance_id, reinstall_instance_request, x_trace_id=x_trace_id)
print("The response of InstancesApi->reinstall_instance:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InstancesApi->reinstall_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | 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 | ReinstallInstanceRequest | ||
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains instanceId and createdDate. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FindInstanceResponse retrieve_instance(x_request_id, instance_id, x_trace_id=x_trace_id)
Get specific instance by id
Get attributes values to a specific instance on your account.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.find_instance_response import FindInstanceResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.InstancesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [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' # str | Identifier to trace group of requests. (optional)
try:
# Get specific instance by id
api_response = api_instance.retrieve_instance(x_request_id, instance_id, x_trace_id=x_trace_id)
print("The response of InstancesApi->retrieve_instance:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InstancesApi->retrieve_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | 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 | str | Identifier to trace group of requests. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains standard instance attributes. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListInstancesResponse retrieve_instances_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, display_name=display_name, data_center=data_center, region=region, instance_id=instance_id, instance_ids=instance_ids, status=status, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search)
List instances
List and filter all instances in your account
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.list_instances_response import ListInstancesResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.InstancesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [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' # str | Identifier to trace group of requests. (optional)
page = 1 # int | Number of page to be fetched. (optional)
size = 10 # int | Number of elements per page. (optional)
order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional)
name = 'vmd12345' # str | The name of the instance (optional)
display_name = 'myTestInstance' # str | The display name of the instance (optional)
data_center = 'European Union 1' # str | The data center of the instance (optional)
region = 'EU' # str | The Region of the instance (optional)
instance_id = 100 # int | The identifier of the instance (deprecated) (optional)
instance_ids = '100, 101, 102' # str | Comma separated instances identifiers (optional)
status = 'provisioning,installing' # str | The status of the instance (optional)
add_on_ids = '1044,827' # str | Identifiers of Addons the instances have (optional)
product_types = 'ssd, hdd, nvme' # str | Comma separated instance's category depending on Product Id (optional)
ip_config = true # bool | Filter instances that have an ip config (optional)
search = 'vmd12345' # str | Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` (optional)
try:
# List instances
api_response = api_instance.retrieve_instances_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, display_name=display_name, data_center=data_center, region=region, instance_id=instance_id, instance_ids=instance_ids, status=status, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search)
print("The response of InstancesApi->retrieve_instances_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InstancesApi->retrieve_instances_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
x_trace_id | str | 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 | List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC | DESC`. |
name | str | The name of the instance | [optional] |
display_name | str | The display name of the instance | [optional] |
data_center | str | The data center of the instance | [optional] |
region | str | The Region of the instance | [optional] |
instance_id | int | The identifier of the instance (deprecated) | [optional] |
instance_ids | str | Comma separated instances identifiers | [optional] |
status | str | The status of the instance | [optional] |
add_on_ids | str | Identifiers of Addons the instances have | [optional] |
product_types | str | Comma separated instance's category depending on Product Id | [optional] |
ip_config | bool | Filter instances that have an ip config | [optional] |
search | str | Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains a paginated list of instances. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PatchInstanceResponse upgrade_instance(x_request_id, instance_id, upgrade_instance_request, x_trace_id=x_trace_id)
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.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.patch_instance_response import PatchInstanceResponse
from pfruck_contabo.models.upgrade_instance_request import UpgradeInstanceRequest
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.InstancesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [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 = pfruck_contabo.UpgradeInstanceRequest() # UpgradeInstanceRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Upgrading instance capabilities
api_response = api_instance.upgrade_instance(x_request_id, instance_id, upgrade_instance_request, x_trace_id=x_trace_id)
print("The response of InstancesApi->upgrade_instance:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InstancesApi->upgrade_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | 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 | UpgradeInstanceRequest | ||
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains standard instance attributes. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]