Models

ServerApi

ServerApi

All URIs are relative to https://api.ionos.com/cloudapi/v5

Method

HTTP request

Description

datacentersServersCdromsDelete

DELETE /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}

Detach a CD-ROM

datacentersServersCdromsFindById

GET /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}

Retrieve an attached CD-ROM

datacentersServersCdromsGet

GET /datacenters/{datacenterId}/servers/{serverId}/cdroms

List attached CD-ROMs

datacentersServersCdromsPost

POST /datacenters/{datacenterId}/servers/{serverId}/cdroms

Attach a CD-ROM

datacentersServersDelete

DELETE /datacenters/{datacenterId}/servers/{serverId}

Delete a Server

datacentersServersFindById

GET /datacenters/{datacenterId}/servers/{serverId}

Retrieve a Server

datacentersServersGet

GET /datacenters/{datacenterId}/servers

List Servers

datacentersServersPatch

PATCH /datacenters/{datacenterId}/servers/{serverId}

Partially modify a Server

datacentersServersPost

POST /datacenters/{datacenterId}/servers

Create a Server

datacentersServersPut

PUT /datacenters/{datacenterId}/servers/{serverId}

Modify a Server

datacentersServersRebootPost

POST /datacenters/{datacenterId}/servers/{serverId}/reboot

Reboot a Server

datacentersServersStartPost

POST /datacenters/{datacenterId}/servers/{serverId}/start

Start a Server

datacentersServersStopPost

POST /datacenters/{datacenterId}/servers/{serverId}/stop

Stop a Server

datacentersServersUpgradePost

POST /datacenters/{datacenterId}/servers/{serverId}/upgrade

Upgrade a Server

datacentersServersVolumesDelete

DELETE /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}

Detach a volume

datacentersServersVolumesFindById

GET /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}

Retrieve an attached volume

datacentersServersVolumesGet

GET /datacenters/{datacenterId}/servers/{serverId}/volumes

List Attached Volumes

datacentersServersVolumesPost

POST /datacenters/{datacenterId}/servers/{serverId}/volumes

Attach a volume

datacentersServersCdromsDelete

Object datacentersServersCdromsDelete(datacenterId, serverId, cdromId, pretty, depth, xContractNumber)

Detach a CD-ROM

This will detach a CD-ROM from the server

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the Datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
String cdromId = "cdromId_example"; // String | The unique ID of the CD-ROM
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Object result = apiInstance.datacentersServersCdromsDelete(datacenterId, serverId, cdromId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersCdromsDelete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the Datacenter

serverId

String

The unique ID of the Server

cdromId

String

The unique ID of the CD-ROM

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersCdromsFindById

Image datacentersServersCdromsFindById(datacenterId, serverId, cdromId, pretty, depth, xContractNumber)

Retrieve an attached CD-ROM

You can retrieve a specific CD-ROM attached to the server

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the Datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
String cdromId = "cdromId_example"; // String | The unique ID of the CD-ROM
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Image result = apiInstance.datacentersServersCdromsFindById(datacenterId, serverId, cdromId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersCdromsFindById");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the Datacenter

serverId

String

The unique ID of the Server

cdromId

String

The unique ID of the CD-ROM

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Image

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersCdromsGet

Cdroms datacentersServersCdromsGet(datacenterId, serverId, pretty, depth, xContractNumber, offset, limit)

List attached CD-ROMs

You can retrieve a list of CD-ROMs attached to the server.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the Datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
Integer offset = 0; // Integer | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
Integer limit = 1000; // Integer | the maximum number of elements to return (use together with <code>offset</code> for pagination)
try {
Cdroms result = apiInstance.datacentersServersCdromsGet(datacenterId, serverId, pretty, depth, xContractNumber, offset, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersCdromsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the Datacenter

serverId

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

offset

Integer

the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)

[optional] [default to 0]

limit

Integer

the maximum number of elements to return (use together with <code>offset</code> for pagination)

[optional] [default to 1000]

Return type

Cdroms

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersCdromsPost

Image datacentersServersCdromsPost(datacenterId, serverId, cdrom, pretty, depth, xContractNumber)

Attach a CD-ROM

You can attach a CD-ROM to an existing server. You can attach up to 2 CD-ROMs to one server.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the Datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Image cdrom = new Image(); // Image | CD-ROM to be attached
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Image result = apiInstance.datacentersServersCdromsPost(datacenterId, serverId, cdrom, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersCdromsPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the Datacenter

serverId

String

The unique ID of the Server

cdrom

Image

CD-ROM to be attached

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Image

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersDelete

Object datacentersServersDelete(datacenterId, serverId, pretty, depth, xContractNumber)

Delete a Server

This will remove a server from your datacenter; however, it will not remove the storage volumes attached to the server. You will need to make a separate API call to perform that action

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Object result = apiInstance.datacentersServersDelete(datacenterId, serverId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersDelete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersFindById

Server datacentersServersFindById(datacenterId, serverId, pretty, depth, xContractNumber)

Retrieve a Server

Returns information about a server such as its configuration, provisioning status, etc.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Server result = apiInstance.datacentersServersFindById(datacenterId, serverId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersFindById");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Server

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersGet

Servers datacentersServersGet(datacenterId, pretty, depth, upgradeNeeded, xContractNumber, offset, limit)

List Servers

You can retrieve a list of servers within a datacenter

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Boolean upgradeNeeded = true; // Boolean | It can be used to filter which servers can be upgraded which can not be upgraded.
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
Integer offset = 0; // Integer | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
Integer limit = 1000; // Integer | the maximum number of elements to return (use together with <code>offset</code> for pagination)
try {
Servers result = apiInstance.datacentersServersGet(datacenterId, pretty, depth, upgradeNeeded, xContractNumber, offset, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

upgradeNeeded

Boolean

It can be used to filter which servers can be upgraded which can not be upgraded.

[optional]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

offset

Integer

the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)

[optional] [default to 0]

limit

Integer

the maximum number of elements to return (use together with <code>offset</code> for pagination)

[optional] [default to 1000]

Return type

Servers

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersPatch

Server datacentersServersPatch(datacenterId, serverId, server, pretty, depth, xContractNumber)

Partially modify a Server

You can use update attributes of a server

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the server
ServerProperties server = new ServerProperties(); // ServerProperties | Modified properties of Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Server result = apiInstance.datacentersServersPatch(datacenterId, serverId, server, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersPatch");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the server

server

ServerProperties

Modified properties of Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Server

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersPost

Server datacentersServersPost(datacenterId, server, pretty, depth, xContractNumber)

Create a Server

Creates a server within an existing datacenter. You can configure the boot volume and connect the server to an existing LAN.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
Server server = new Server(); // Server | Server to be created
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Server result = apiInstance.datacentersServersPost(datacenterId, server, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

server

Server

Server to be created

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Server

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersPut

Server datacentersServersPut(datacenterId, serverId, server, pretty, depth, xContractNumber)

Modify a Server

Allows to modify the attributes of a Server. From v5 onwards 'allowReboot' attribute will no longer be available. For certain server property change it was earlier forced to be provided. Now this behaviour is implicit and backend will do this automatically e.g. in earlier versions, when CPU family changes, the 'allowReboot' property was required to be set to true which will no longer be the case and the server will be rebooted automatically

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the server
Server server = new Server(); // Server | Modified Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Server result = apiInstance.datacentersServersPut(datacenterId, serverId, server, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersPut");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the server

server

Server

Modified Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Server

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersRebootPost

Object datacentersServersRebootPost(datacenterId, serverId, pretty, depth, xContractNumber)

Reboot a Server

This will force a hard reboot of the server. Do not use this method if you want to gracefully reboot the machine. This is the equivalent of powering off the machine and turning it back on.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Object result = apiInstance.datacentersServersRebootPost(datacenterId, serverId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersRebootPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersStartPost

Object datacentersServersStartPost(datacenterId, serverId, pretty, depth, xContractNumber)

Start a Server

This will start a server. If the server's public IP was deallocated then a new IP will be assigned

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Object result = apiInstance.datacentersServersStartPost(datacenterId, serverId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersStartPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersStopPost

Object datacentersServersStopPost(datacenterId, serverId, pretty, depth, xContractNumber)

Stop a Server

This will stop a server. The machine will be forcefully powered off, billing will cease, and the public IP, if one is allocated, will be deallocated. The operation is not supported for Cube servers.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Object result = apiInstance.datacentersServersStopPost(datacenterId, serverId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersStopPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersUpgradePost

Object datacentersServersUpgradePost(datacenterId, serverId, pretty, depth, xContractNumber)

Upgrade a Server

This will upgrade the version of the server, if needed. To verify if there is an upgrade available for a server, call '/datacenters/{datacenterId}/servers?upgradeNeeded=true'

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ServerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ServerApi apiInstance = new ServerApi(defaultClient);
String datacenterId = "datacenterId_example"; // String | The unique ID of the datacenter
String serverId = "serverId_example"; // String | The unique ID of the Server
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) 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
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Object result = apiInstance.datacentersServersUpgradePost(datacenterId, serverId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#datacentersServersUpgradePost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

datacenterId

String

The unique ID of the datacenter

serverId

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)