Links

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, opts)
Detach CD-ROMs
Detach the specified CD-ROM from the server.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
server_id = 'server_id_example' # String | The unique ID of the server.
cdrom_id = 'cdrom_id_example' # String | The unique ID of the CD-ROM.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | 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
x_contract_number: 56 # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
}
begin
# Detach CD-ROMs
api_instance.datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id, opts)
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_delete: #{e}"
end

Using the datacenters_servers_cdroms_delete_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.
<Array(nil, Integer, Hash)> datacenters_servers_cdroms_delete_with_http_info(datacenter_id, server_id, cdrom_id, opts)
begin
# Detach CD-ROMs
data, status_code, headers = api_instance.datacenters_servers_cdroms_delete_with_http_info(datacenter_id, server_id, cdrom_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_delete_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
server_id
String
The unique ID of the server.
cdrom_id
String
The unique ID of the CD-ROM.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
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
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

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

datacenters_servers_cdroms_find_by_id

datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, opts)
Retrieve attached CD-ROMs
Retrieve the properties of the CD-ROM, attached to the specified server.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
server_id = 'server_id_example' # String | The unique ID of the server.
cdrom_id = 'cdrom_id_example' # String | The unique ID of the CD-ROM.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | 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
x_contract_number: 56 # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
}
begin
# Retrieve attached CD-ROMs
result = api_instance.datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_find_by_id: #{e}"
end

Using the datacenters_servers_cdroms_find_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_servers_cdroms_find_by_id_with_http_info(datacenter_id, server_id, cdrom_id, opts)
begin
# Retrieve attached CD-ROMs
data, status_code, headers = api_instance.datacenters_servers_cdroms_find_by_id_with_http_info(datacenter_id, server_id, cdrom_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Image>
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_find_by_id_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
server_id
String
The unique ID of the server.
cdrom_id
String
The unique ID of the CD-ROM.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
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
Integer
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

datacenters_servers_cdroms_get(datacenter_id, server_id, opts)
List attached CD-ROMs
List all CD-ROMs, attached to the specified server.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
server_id = 'server_id_example' # String | The unique ID of the server.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | 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
x_contract_number: 56, # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
offset: 56, # Integer | 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).
limit: 56 # Integer | The maximum number of elements to return (use together with offset for pagination).
}
begin
# List attached CD-ROMs
result = api_instance.datacenters_servers_cdroms_get(datacenter_id, server_id, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_get: #{e}"
end

Using the datacenters_servers_cdroms_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_servers_cdroms_get_with_http_info(datacenter_id, server_id, opts)
begin
# List attached CD-ROMs
data, status_code, headers = api_instance.datacenters_servers_cdroms_get_with_http_info(datacenter_id, server_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Cdroms>
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_get_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
server_id
String
The unique ID of the server.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
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
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
offset
Integer
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
Integer
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

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

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
server_id = 'server_id_example' # String | The unique ID of the server.
cdrom = Ionoscloud::Image.new({properties: Ionoscloud::ImageProperties.new({licence_type: 'UNKNOWN'})}) # Image | The CD-ROM to be attached.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | 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
x_contract_number: 56 # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
}
begin
# Attach CD-ROMs
result = api_instance.datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_post: #{e}"
end

Using the datacenters_servers_cdroms_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_servers_cdroms_post_with_http_info(datacenter_id, server_id, cdrom, opts)
begin
# Attach CD-ROMs
data, status_code, headers = api_instance.datacenters_servers_cdroms_post_with_http_info(datacenter_id, server_id, cdrom, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Image>
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_cdroms_post_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
server_id
String
The unique ID of the server.
cdrom
Image
The CD-ROM to be attached.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
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
Integer
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, opts)
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.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
server_id = 'server_id_example' # String | The unique ID of the server.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | 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
x_contract_number: 56, # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
delete_volumes: true # Boolean | If true, all attached storage volumes will also be deleted.
}
begin
# Delete servers
api_instance.datacenters_servers_delete(datacenter_id, server_id, opts)
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_delete: #{e}"
end

Using the datacenters_servers_delete_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.
<Array(nil, Integer, Hash)> datacenters_servers_delete_with_http_info(datacenter_id, server_id, opts)
begin
# Delete servers
data, status_code, headers = api_instance.datacenters_servers_delete_with_http_info(datacenter_id, server_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_delete_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
server_id
String
The unique ID of the server.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
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
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
delete_volumes
Boolean
If true, all attached storage volumes will also be deleted.
[optional]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

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

datacenters_servers_find_by_id

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

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
server_id = 'server_id_example' # String | The unique ID of the server.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | 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
x_contract_number: 56 # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
}
begin
# Retrieve servers by ID
result = api_instance.datacenters_servers_find_by_id(datacenter_id, server_id, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_find_by_id: #{e}"
end

Using the datacenters_servers_find_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_servers_find_by_id_with_http_info(datacenter_id, server_id, opts)
begin
# Retrieve servers by ID
data, status_code, headers = api_instance.datacenters_servers_find_by_id_with_http_info(datacenter_id, server_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Server>
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_find_by_id_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
server_id
String
The unique ID of the server.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
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
Integer
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

datacenters_servers_get(datacenter_id, opts)
List servers
List all servers within the data center.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | 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
upgrade_needed: true, # Boolean | Filter servers that can or that cannot be upgraded.
x_contract_number: 56, # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
offset: 56, # Integer | 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).
limit: 56 # Integer | The maximum number of elements to return (use together with offset for pagination).
}
begin
# List servers
result = api_instance.datacenters_servers_get(datacenter_id, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_get: #{e}"
end

Using the datacenters_servers_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_servers_get_with_http_info(datacenter_id, opts)
begin
# List servers
data, status_code, headers = api_instance.datacenters_servers_get_with_http_info(datacenter_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Servers>
rescue Ionoscloud::ApiError => e
puts "Error when calling ServersApi->datacenters_servers_get_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional][default to true]
depth
Integer
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
Boolean
Filter servers that can or that cannot be upgraded.
[optional]
x_contract_number
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
offset
Integer
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
Integer
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

datacenters_servers_patch(datacenter_id, server_id, server, opts)
Partially modify servers
Update the properties of the specified server within the data center.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::ServersApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
server_id = 'server_id_example' # String | The unique ID of the server.
server = Ionoscloud::ServerProperties.new({cores: 4, ram: 4096}) # ServerProperties | The properties of the server to be updated.
opts = {
pretty: true,