Links

LabelsApi

All URIs are relative to https://api.ionos.com/cloudapi/v6
Method
HTTP request
Description
DELETE /datacenters/{datacenterId}/labels/{key}
Delete data center labels
GET /datacenters/{datacenterId}/labels/{key}
Retrieve data center labels
GET /datacenters/{datacenterId}/labels
List data center labels
POST /datacenters/{datacenterId}/labels
Create data center labels
PUT /datacenters/{datacenterId}/labels/{key}
Modify data center labels
DELETE /datacenters/{datacenterId}/servers/{serverId}/labels/{key}
Delete server labels
GET /datacenters/{datacenterId}/servers/{serverId}/labels/{key}
Retrieve server labels
GET /datacenters/{datacenterId}/servers/{serverId}/labels
List server labels
POST /datacenters/{datacenterId}/servers/{serverId}/labels
Create server labels
PUT /datacenters/{datacenterId}/servers/{serverId}/labels/{key}
Modify server labels
DELETE /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}
Delete volume labels
GET /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}
Retrieve volume labels
GET /datacenters/{datacenterId}/volumes/{volumeId}/labels
List volume labels
POST /datacenters/{datacenterId}/volumes/{volumeId}/labels
Create volume labels
PUT /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}
Modify volume labels
DELETE /ipblocks/{ipblockId}/labels/{key}
Delete IP block labels
GET /ipblocks/{ipblockId}/labels/{key}
Retrieve IP block labels
GET /ipblocks/{ipblockId}/labels
List IP block labels
POST /ipblocks/{ipblockId}/labels
Create IP block labels
PUT /ipblocks/{ipblockId}/labels/{key}
Modify IP block labels
GET /labels/{labelurn}
Retrieve labels by URN
GET /labels
List labels
DELETE /snapshots/{snapshotId}/labels/{key}
Delete snapshot labels
GET /snapshots/{snapshotId}/labels/{key}
Retrieve snapshot labels
GET /snapshots/{snapshotId}/labels
List snapshot labels
POST /snapshots/{snapshotId}/labels
Create snapshot labels
PUT /snapshots/{snapshotId}/labels/{key}
Modify snapshot labels

datacenters_labels_delete

datacenters_labels_delete(datacenter_id, key, opts)
Delete data center labels
Delete the specified data center label.

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::LabelsApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
key = 'key_example' # String | The label key
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
# Delete data center labels
api_instance.datacenters_labels_delete(datacenter_id, key, opts)
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_delete: #{e}"
end

Using the datacenters_labels_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_labels_delete_with_http_info(datacenter_id, key, opts)
begin
# Delete data center labels
data, status_code, headers = api_instance.datacenters_labels_delete_with_http_info(datacenter_id, key, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_delete_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
key
String
The label key
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_labels_find_by_key

datacenters_labels_find_by_key(datacenter_id, key, opts)
Retrieve data center labels
Retrieve the properties of the specified data center label.

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::LabelsApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
key = 'key_example' # String | The label key
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 data center labels
result = api_instance.datacenters_labels_find_by_key(datacenter_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_find_by_key: #{e}"
end

Using the datacenters_labels_find_by_key_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts)
begin
# Retrieve data center labels
data, status_code, headers = api_instance.datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_find_by_key_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
key
String
The label key
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

Authorization

Basic Authentication, Token Authentication

HTTP request headers

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

datacenters_labels_get

datacenters_labels_get(datacenter_id, opts)
List data center labels
List all the the labels for the specified 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::LabelsApi.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
x_contract_number: 56 # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
}
begin
# List data center labels
result = api_instance.datacenters_labels_get(datacenter_id, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_get: #{e}"
end

Using the datacenters_labels_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_labels_get_with_http_info(datacenter_id, opts)
begin
# List data center labels
data, status_code, headers = api_instance.datacenters_labels_get_with_http_info(datacenter_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResources>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_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]
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

Authorization

Basic Authentication, Token Authentication

HTTP request headers

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

datacenters_labels_post

datacenters_labels_post(datacenter_id, label, opts)
Create data center labels
Add a new label to the specified 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::LabelsApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | The label to create.
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
# Create data center labels
result = api_instance.datacenters_labels_post(datacenter_id, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_post: #{e}"
end

Using the datacenters_labels_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_labels_post_with_http_info(datacenter_id, label, opts)
begin
# Create data center labels
data, status_code, headers = api_instance.datacenters_labels_post_with_http_info(datacenter_id, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_post_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
label
The label to create.
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

Authorization

Basic Authentication, Token Authentication

HTTP request headers

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

datacenters_labels_put

datacenters_labels_put(datacenter_id, key, label, opts)
Modify data center labels
Modify the specified data center label.

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::LabelsApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the data center.
key = 'key_example' # String | The label key
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | The modified label
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
# Modify data center labels
result = api_instance.datacenters_labels_put(datacenter_id, key, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_put: #{e}"
end

Using the datacenters_labels_put_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_labels_put_with_http_info(datacenter_id, key, label, opts)
begin
# Modify data center labels
data, status_code, headers = api_instance.datacenters_labels_put_with_http_info(datacenter_id, key, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_labels_put_with_http_info: #{e}"
end

Parameters

Name
Type
Description
Notes
datacenter_id
String
The unique ID of the data center.
key
String
The label key
label
The modified label
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

Authorization

Basic Authentication, Token Authentication

HTTP request headers

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

datacenters_servers_labels_delete

datacenters_servers_labels_delete(datacenter_id, server_id, key, opts)
Delete server labels
Delete the specified server label.

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::LabelsApi.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.
key = 'key_example' # String | The label key
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
# Delete server labels
api_instance.datacenters_servers_labels_delete(datacenter_id, server_id, key, opts)
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_servers_labels_delete: #{e}"
end

Using the datacenters_servers_labels_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_labels_delete_with_http_info(datacenter_id, server_id, key, opts)
begin
# Delete server labels
data, status_code, headers = api_instance.datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_servers_labels_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.
key
String
The label key
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_labels_find_by_key

datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts)
Retrieve server labels
Retrieve the properties of the specified server label.

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::LabelsApi.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.
key = 'key_example' # String | The label key
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 server labels
result = api_instance.datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_servers_labels_find_by_key: #{e}"
end

Using the datacenters_servers_labels_find_by_key_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts)
begin
# Retrieve server labels
data, status_code, headers = api_instance.datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_servers_labels_find_by_key_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.
key
String
The label key
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

Authorization

Basic Authentication, Token Authentication

HTTP request headers

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

datacenters_servers_labels_get

datacenters_servers_labels_get(datacenter_id, server_id, opts)
List server labels
List all the the labels for 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::LabelsApi.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
# List server labels
result = api_instance.datacenters_servers_labels_get(datacenter_id, server_id, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelsApi->datacenters_servers_labels_get: #{e}"
end

Using the datacenters_servers_labels_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts)