Links

ServersApi

ServersApi

All URIs are relative to https://api.ionos.com/cloudapi/v6
Method
HTTP request
Description
DELETE /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}
Detach CD-ROMs
GET /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}
Retrieve attached CD-ROMs
GET /datacenters/{datacenterId}/servers/{serverId}/cdroms
List attached CD-ROMs
POST /datacenters/{datacenterId}/servers/{serverId}/cdroms
Attach CD-ROMs
DELETE /datacenters/{datacenterId}/servers/{serverId}
Delete servers
GET /datacenters/{datacenterId}/servers/{serverId}
Retrieve servers by ID
GET /datacenters/{datacenterId}/servers
List servers
PATCH /datacenters/{datacenterId}/servers/{serverId}
Partially modify servers
POST /datacenters/{datacenterId}/servers
Create servers
PUT /datacenters/{datacenterId}/servers/{serverId}
Modify servers
POST /datacenters/{datacenterId}/servers/{serverId}/reboot
Reboot servers
GET /datacenters/{datacenterId}/servers/{serverId}/remoteconsole
Get Remote Console link
POST /datacenters/{datacenterId}/servers/{serverId}/resume
Resume Cubes instances
POST /datacenters/{datacenterId}/servers/{serverId}/start
Start servers
POST /datacenters/{datacenterId}/servers/{serverId}/stop
Stop VMs
POST /datacenters/{datacenterId}/servers/{serverId}/suspend
Suspend Cubes instances
GET /datacenters/{datacenterId}/servers/{serverId}/token
Get JASON Web Token
POST /datacenters/{datacenterId}/servers/{serverId}/upgrade
Upgrade servers
DELETE /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}
Detach volumes
GET /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}
Retrieve attached volumes
GET /datacenters/{datacenterId}/servers/{serverId}/volumes
List attached volumes
POST /datacenters/{datacenterId}/servers/{serverId}/volumes
Attach volumes

datacenters_servers_cdroms_delete

datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Detach CD-ROMs
Detach the specified CD-ROM from the server.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM.
try:
# Detach CD-ROMs
api_instance.datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_cdroms_delete: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server_id
str
The unique ID of the server.
cdrom_id
str
The unique ID of the CD-ROM.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]

Return type

void (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

datacenters_servers_cdroms_find_by_id

Image datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Retrieve attached CD-ROMs
Retrieve the properties of the CD-ROM, attached to the specified server.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM.
try:
# Retrieve attached CD-ROMs
api_response = api_instance.datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id)
print(api_response)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_cdroms_find_by_id: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server_id
str
The unique ID of the server.
cdrom_id
str
The unique ID of the CD-ROM.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]

Return type

Image

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

datacenters_servers_cdroms_get

Cdroms datacenters_servers_cdroms_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit)
List attached CD-ROMs
List all CD-ROMs, attached to the specified server.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
try:
# List attached CD-ROMs
api_response = api_instance.datacenters_servers_cdroms_get(datacenter_id, server_id)
print(api_response)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_cdroms_get: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server_id
str
The unique ID of the server.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
offset
int
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[optional] [default to 0]
limit
int
The maximum number of elements to return (use together with offset for pagination).
[optional] [default to 1000]

Return type

Cdroms

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

datacenters_servers_cdroms_post

Image datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Attach CD-ROMs
Attach a CD-ROM to an existing server. Up to two CD-ROMs can be attached to the same server.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
cdrom = ionoscloud.Image() # Image | The CD-ROM to be attached.
try:
# Attach CD-ROMs
api_response = api_instance.datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom)
print(api_response)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_cdroms_post: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server_id
str
The unique ID of the server.
cdrom
Image
The CD-ROM to be attached.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]

Return type

Image

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

datacenters_servers_delete

datacenters_servers_delete(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, delete_volumes=delete_volumes)
Delete servers
Delete the specified server in your data center. The attached storage volumes will not be removed — a separate API call must be made for these actions.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
try:
# Delete servers
api_instance.datacenters_servers_delete(datacenter_id, server_id)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_delete: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server_id
str
The unique ID of the server.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
delete_volumes
bool
If true, all attached storage volumes will also be deleted.
[optional]

Return type

void (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

datacenters_servers_find_by_id

Server datacenters_servers_find_by_id(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Retrieve servers by ID
Retrieve information about the specified server within the data center, such as its configuration, provisioning status, and so on.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
try:
# Retrieve servers by ID
api_response = api_instance.datacenters_servers_find_by_id(datacenter_id, server_id)
print(api_response)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_find_by_id: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server_id
str
The unique ID of the server.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

datacenters_servers_get

Servers datacenters_servers_get(datacenter_id, pretty=pretty, depth=depth, upgrade_needed=upgrade_needed, x_contract_number=x_contract_number, offset=offset, limit=limit)
List servers
List all servers within the data center.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
try:
# List servers
api_response = api_instance.datacenters_servers_get(datacenter_id)
print(api_response)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_get: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
upgrade_needed
bool
Filter servers that can or that cannot be upgraded.
[optional]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
offset
int
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[optional] [default to 0]
limit
int
The maximum number of elements to return (use together with offset for pagination).
[optional] [default to 1000]

Return type

Servers

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

datacenters_servers_patch

Server datacenters_servers_patch(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Partially modify servers
Update the properties of the specified server within the data center.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
server = ionoscloud.ServerProperties() # ServerProperties | The properties of the server to be updated.
try:
# Partially modify servers
api_response = api_instance.datacenters_servers_patch(datacenter_id, server_id, server)
print(api_response)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_patch: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server_id
str
The unique ID of the server.
server
The properties of the server to be updated.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

datacenters_servers_post

Server datacenters_servers_post(datacenter_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Create servers
Create a server within the specified data center. You can also use this request to configure the boot volumes and connect to existing LANs at the same time.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server = ionoscloud.Server() # Server | The server to create.
try:
# Create servers
api_response = api_instance.datacenters_servers_post(datacenter_id, server)
print(api_response)
except ApiException as e:
print('Exception when calling ServersApi.datacenters_servers_post: %s\n' % e)

Parameters

Name
Type
Description
Notes
datacenter_id
str
The unique ID of the data center.
server
Server
The server to create.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
x_contract_number
int
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

datacenters_servers_put

Server datacenters_servers_put(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Modify servers
Modify the properties of the specified server within the data center. Starting with v5, the 'allowReboot' attribute is retired; while previously required for changing certain server properties, this behavior is now implicit, and the backend will perform this automatically. For example, in earlier versions, when the CPU family is changed, 'allowReboot' had to be set to 'true'; this is no longer required, the reboot will be performed automatically.

Example

from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.ServersApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.