All URIs are relative to https://api.contabo.com
Method | HTTP request | Description |
---|---|---|
create_custom_image | POST /v1/compute/images | Provide a custom image |
delete_image | DELETE /v1/compute/images/{imageId} | Delete an uploaded custom image by its id |
retrieve_custom_images_stats | GET /v1/compute/images/stats | List statistics regarding the customer's custom images |
retrieve_image | GET /v1/compute/images/{imageId} | Get details about a specific image by its id |
retrieve_image_list | GET /v1/compute/images | List available standard and custom images |
update_image | PATCH /v1/compute/images/{imageId} | Update custom image name by its id |
CreateCustomImageResponse create_custom_image(x_request_id, create_custom_image_request, x_trace_id=x_trace_id)
Provide a custom image
In order to provide a custom image please specify an URL from where the image can be directly downloaded. A custom image must be in either .iso
or .qcow2
format. Other formats will be rejected. Please note that downloading can take a while depending on network speed resp. bandwidth and size of image. You can check the status by retrieving information about the image via a GET request. Download will be rejected if you have exceeded your limits.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.create_custom_image_request import CreateCustomImageRequest
from pfruck_contabo.models.create_custom_image_response import CreateCustomImageResponse
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.ImagesApi(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_custom_image_request = pfruck_contabo.CreateCustomImageRequest() # CreateCustomImageRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Provide a custom image
api_response = api_instance.create_custom_image(x_request_id, create_custom_image_request, x_trace_id=x_trace_id)
print("The response of ImagesApi->create_custom_image:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ImagesApi->create_custom_image: %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_custom_image_request | CreateCustomImageRequest | ||
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 | - |
415 | The response will be an error in case the provided image URL is not in .qcow2 or .iso format | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_image(x_request_id, image_id, x_trace_id=x_trace_id)
Delete an uploaded custom image by its id
Your are free to delete a previously uploaded custom images at any time
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
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.ImagesApi(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.
image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' # str | The identifier of the image
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Delete an uploaded custom image by its id
api_instance.delete_image(x_request_id, image_id, x_trace_id=x_trace_id)
except Exception as e:
print("Exception when calling ImagesApi->delete_image: %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. | |
image_id | str | The identifier of the image | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | Response body has no content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomImagesStatsResponse retrieve_custom_images_stats(x_request_id, x_trace_id=x_trace_id)
List statistics regarding the customer's custom images
List statistics regarding the customer's custom images such as the number of custom images uploaded, used disk space, free available disk space and total available disk space
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.custom_images_stats_response import CustomImagesStatsResponse
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.ImagesApi(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)
try:
# List statistics regarding the customer's custom images
api_response = api_instance.retrieve_custom_images_stats(x_request_id, x_trace_id=x_trace_id)
print("The response of ImagesApi->retrieve_custom_images_stats:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ImagesApi->retrieve_custom_images_stats: %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] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains the custom images count, the total available disk space, the used disk space and the free disk space. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FindImageResponse retrieve_image(x_request_id, image_id, x_trace_id=x_trace_id)
Get details about a specific image by its id
Get details about a specific image. This could be either a standard or custom image. In case of an custom image you can also check the download status
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.find_image_response import FindImageResponse
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.ImagesApi(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.
image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' # str | The identifier of the image
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Get details about a specific image by its id
api_response = api_instance.retrieve_image(x_request_id, image_id, x_trace_id=x_trace_id)
print("The response of ImagesApi->retrieve_image:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ImagesApi->retrieve_image: %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. | |
image_id | str | The identifier of the image | |
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 custom image attributes | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListImageResponse retrieve_image_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, standard_image=standard_image)
List available standard and custom images
List and filter all available standard images provided by Contabo and your uploaded custom images.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.list_image_response import ListImageResponse
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.ImagesApi(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 = 'Ubuntu' # str | The name of the image (optional)
standard_image = true # bool | Flag indicating that image is either a standard (true) or a custom image (false) (optional)
try:
# List available standard and custom images
api_response = api_instance.retrieve_image_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, standard_image=standard_image)
print("The response of ImagesApi->retrieve_image_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ImagesApi->retrieve_image_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 image | [optional] |
standard_image | bool | Flag indicating that image is either a standard (true) or a custom image (false) | [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 images. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateCustomImageResponse update_image(x_request_id, image_id, update_custom_image_request, x_trace_id=x_trace_id)
Update custom image name by its id
Update name of the custom image
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.update_custom_image_request import UpdateCustomImageRequest
from pfruck_contabo.models.update_custom_image_response import UpdateCustomImageResponse
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.ImagesApi(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.
image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' # str | The identifier of the image
update_custom_image_request = pfruck_contabo.UpdateCustomImageRequest() # UpdateCustomImageRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Update custom image name by its id
api_response = api_instance.update_image(x_request_id, image_id, update_custom_image_request, x_trace_id=x_trace_id)
print("The response of ImagesApi->update_image:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ImagesApi->update_image: %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. | |
image_id | str | The identifier of the image | |
update_custom_image_request | UpdateCustomImageRequest | ||
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 custom image attributes | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]