ServersApi

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

MethodHTTP requestDescription

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

Detach a CD-ROM by ID

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

Get Attached CD-ROM by ID

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

Get Attached CD-ROMs

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

Attach a CD-ROM

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 a Server

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

Modify a Server by ID

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 a Cube Server by ID

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

Start an Enterprise Server by ID

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

Stop an Enterprise Server by ID

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

Suspend a Cube Server by ID

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

Get JASON Web Token

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

Upgrade a Server by ID

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

Detach a Volume by ID

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

Get Attached Volume by ID

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

Get Attached Volumes

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

Attach a Volume to a Server

datacentersServersCdromsDelete

datacentersServersCdromsDelete(datacenterId, serverId, cdromId, opts)

Detach a CD-ROM by ID

Detachs the specified CD-ROM from the server. Detaching a CD-ROM deletes the CD-ROM. The image will not be deleted. Note that detaching a CD-ROM leads to a reset of the server.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Detach a CD-ROM by ID
api_instance
  .datacentersServersCdromsDelete({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    cdromId: cdromId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

cdromId

string

The unique ID of the CD-ROM.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersCdromsFindById

datacentersServersCdromsFindById(datacenterId, serverId, cdromId, opts)

Get Attached CD-ROM by ID

Retrieves the properties of the CD-ROM attached to the specified server.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Get Attached CD-ROM by ID
api_instance
  .datacentersServersCdromsFindById({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    cdromId: cdromId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

cdromId

string

The unique ID of the CD-ROM.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Image

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersCdromsGet

datacentersServersCdromsGet(datacenterId, serverId, opts)

Get Attached CD-ROMs

Lists all CD-ROMs attached to the specified server.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Get Attached CD-ROMs 
api_instance
  .datacentersServersCdromsGet({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56,
    offset: 56,
    limit: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

offset

number

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

number

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

datacentersServersCdromsPost

datacentersServersCdromsPost(datacenterId, serverId, cdrom, opts)

Attach a CD-ROM

Attachs a CD-ROM to an existing server specified by its ID. CD-ROMs cannot be created stand-alone like volumes. They are either attached to a server or do not exist. They always have an ISO-Image associated; empty CD-ROMs can not be provisioned. It is possible to attach up to two CD-ROMs to the same server. Note that attaching a CD-ROM leads to a reset of the server.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Attach a CD-ROM
api_instance
  .datacentersServersCdromsPost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    cdrom: cdrom_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

cdrom

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

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Image

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersDelete

datacentersServersDelete(datacenterId, serverId, opts)

Delete servers

Delete the specified server in your data center. The attached storage volumes will also be removed if the query parameter is set to true otherwise a separate API call must be made for these actions.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Delete servers
api_instance
  .datacentersServersDelete({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56,
    deleteVolumes: true, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

deleteVolumes

boolean

If true, all attached storage volumes will also be deleted.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersFindById

datacentersServersFindById(datacenterId, serverId, 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

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Retrieve servers by ID
api_instance
  .datacentersServersFindById({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersGet

datacentersServersGet(datacenterId, opts)

List servers

List all servers within the data center.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List servers 
api_instance
  .datacentersServersGet({
    datacenterId: datacenterId_example,
    pretty: true,
    depth: 56,
    upgradeNeeded: true,
    xContractNumber: 56,
    offset: 56,
    limit: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

upgradeNeeded

boolean

Filter servers that can or that cannot be upgraded.

[optional][default to undefined]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

offset

number

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

number

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

datacentersServersPatch

datacentersServersPatch(datacenterId, serverId, server, opts)

Partially modify servers

Update the properties of the specified server within the data center.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Partially modify servers
api_instance
  .datacentersServersPatch({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    server: server_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

server

The properties of the server to be updated.

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersPost

datacentersServersPost(datacenterId, server, opts)

Create a Server

Creates a server within the specified data center. You can also use this request to configure the boot volumes and connect to existing LANs at the same time.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Create a Server
api_instance
  .datacentersServersPost({
    datacenterId: datacenterId_example,
    server: server_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

server

The server to create.

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersPut

datacentersServersPut(datacenterId, serverId, server, opts)

Modify a Server by ID

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

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Modify a Server by ID
api_instance
  .datacentersServersPut({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    server: server_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

server

The modified server

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersServersRebootPost

datacentersServersRebootPost(datacenterId, serverId, opts)

Reboot servers

Force a hard reboot of the specified server within the data center. Don't use this method if you wish to reboot gracefully. This is an equivalent of powering down a computer and turning it back on.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Reboot servers
api_instance
  .datacentersServersRebootPost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersRemoteConsoleGet

datacentersServersRemoteConsoleGet(datacenterId, serverId, opts)

Get Remote Console link

Retrieve a link with a JSON Web Token for accessing the server's Remote Console.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Get Remote Console link
api_instance
  .datacentersServersRemoteConsoleGet({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

RemoteConsoleUrl

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersResumePost

datacentersServersResumePost(datacenterId, serverId, opts)

Resume a Cube Server by ID

Resumes a suspended Cube Server specified by its ID. Since the suspended instance was not deleted the allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information).

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Resume a Cube Server by ID
api_instance
  .datacentersServersResumePost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersStartPost

datacentersServersStartPost(datacenterId, serverId, opts)

Start an Enterprise Server by ID

Starts the Enterprise Server specified by its ID. >Note that you cannot use this method to start a Cube Server. By starting the Enterprise Server, cores and RAM are provisioned, and the billing continues. If the server's public IPv4 address has been deallocated, a new IPv4 address will be assigned. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information).

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Start an Enterprise Server by ID
api_instance
  .datacentersServersStartPost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersStopPost

datacentersServersStopPost(datacenterId, serverId, opts)

Stop an Enterprise Server by ID

Stops the Enterprise Server specified by its ID. >Note that you cannot use this method to stop a Cube Server. By stopping the Enterprise Server, cores and RAM are freed and no longer charged. Public IPv4 IPs that are not reserved are returned to the IPv4 pool. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information).

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Stop an Enterprise Server by ID
api_instance
  .datacentersServersStopPost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersSuspendPost

datacentersServersSuspendPost(datacenterId, serverId, opts)

Suspend a Cube Server by ID

Suspends the specified Cubes instance within the data center. The instance is not deleted and allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information).

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Suspend a Cube Server by ID
api_instance
  .datacentersServersSuspendPost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersTokenGet

datacentersServersTokenGet(datacenterId, serverId, opts)

Get JASON Web Token

Retrieve a JSON Web Token from the server for use in login operations (such as accessing the server's console).

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Get JASON Web Token
api_instance
  .datacentersServersTokenGet({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Token

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersUpgradePost

datacentersServersUpgradePost(datacenterId, serverId, opts)

Upgrade a Server by ID

Upgrades the server version.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Upgrade a Server by ID
api_instance
  .datacentersServersUpgradePost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersVolumesDelete

datacentersServersVolumesDelete(datacenterId, serverId, volumeId, opts)

Detach a Volume by ID

Detachs the specified volume from the server. Note that only the volume's connection to the specified server is disconnected. If you want to delete the volume, you must submit a separate request to perform the deletion.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Detach a Volume by ID
api_instance
  .datacentersServersVolumesDelete({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    volumeId: volumeId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

volumeId

string

The unique ID of the volume.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

nil (empty response body)

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersVolumesFindById

datacentersServersVolumesFindById(datacenterId, serverId, volumeId, opts)

Get Attached Volume by ID

Retrieves the properties of the volume attached to the specified server.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Get Attached Volume by ID
api_instance
  .datacentersServersVolumesFindById({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    volumeId: volumeId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

volumeId

string

The unique ID of the volume.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Volume

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersVolumesGet

datacentersServersVolumesGet(datacenterId, serverId, opts)

Get Attached Volumes

Lists all volumes attached to the specified server.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// Get Attached Volumes
api_instance
  .datacentersServersVolumesGet({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56,
    offset: 56,
    limit: 56, 
    orderBy: "<property_name>"
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

offset

number

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

number

The maximum number of elements to return (use together with offset for pagination).

[optional][default to 1000]

Return type

AttachedVolumes

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersServersVolumesPost

datacentersServersVolumesPost(datacenterId, serverId, volume, opts)

Attach a Volume to a Server

Attachs an existing storage volume to the specified server. You can attach an existing volume in the VDC to a server. To move a volume from one server to another, you must first detach the volume from the first server and attach it to the second server. It is also possible to create and attach a volume in one step by simply providing a new volume description as a payload. The only difference is the URL; see 'Creating a Volume' for details about volumes. Note that the combined total of attached volumes and NICs cannot exceed 24 per server.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.ServersApi(config);
// Attach a Volume to a Server
api_instance
  .datacentersServersVolumesPost({
    datacenterId: datacenterId_example,
    serverId: serverId_example,
    volume: volume_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
        options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

NameTypeDescriptionNotes

datacenterId

string

The unique ID of the data center.

[default to undefined]

serverId

string

The unique ID of the server.

[default to undefined]

volume

The volume to be attached (or created and attached).

pretty

boolean

Controls whether the response is pretty-printed (with indentations and new lines).

[optional][default to true]

depth

number

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&#39;s children are included. - depth=... and so on

[optional][default to 0]

xContractNumber

number

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

[optional][default to undefined]

Return type

Volume

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

Last updated