Models

ServerApi

ServerApi

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

Method

HTTP request

Description

datacenters_servers_cdroms_delete

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

Detach a CD-ROM

datacenters_servers_cdroms_find_by_id

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

Retrieve an attached CD-ROM

datacenters_servers_cdroms_get

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

List attached CD-ROMs

datacenters_servers_cdroms_post

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

Attach a CD-ROM

datacenters_servers_delete

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

Delete a Server

datacenters_servers_find_by_id

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

Retrieve a Server

datacenters_servers_get

GET /datacenters/{datacenterId}/servers

List Servers

datacenters_servers_patch

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

Partially modify a Server

datacenters_servers_post

POST /datacenters/{datacenterId}/servers

Create a Server

datacenters_servers_put

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

Modify a Server

datacenters_servers_reboot_post

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

Reboot a Server

datacenters_servers_start_post

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

Start a Server

datacenters_servers_stop_post

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

Stop a Server

datacenters_servers_upgrade_post

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

Upgrade a Server

datacenters_servers_volumes_delete

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

Detach a volume

datacenters_servers_volumes_find_by_id

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

Retrieve an attached volume

datacenters_servers_volumes_get

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

List Attached Volumes

datacenters_servers_volumes_post

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

Attach a volume

datacenters_servers_cdroms_delete

object datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Detach a CD-ROM

This will detach a CD-ROM from the server

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Detach a CD-ROM
    api_response = api_instance.datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_delete: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Detach a CD-ROM
    api_response = api_instance.datacenters_servers_cdroms_delete(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_delete: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the Datacenter

server_id

str

The unique ID of the Server

cdrom_id

str

The unique ID of the CD-ROM

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_cdroms_find_by_id

Image datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Retrieve an attached CD-ROM

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

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Retrieve an attached CD-ROM
    api_response = api_instance.datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_find_by_id: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    cdrom_id = 'cdrom_id_example' # str | The unique ID of the CD-ROM
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Retrieve an attached CD-ROM
    api_response = api_instance.datacenters_servers_cdroms_find_by_id(datacenter_id, server_id, cdrom_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_find_by_id: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the Datacenter

server_id

str

The unique ID of the Server

cdrom_id

str

The unique ID of the CD-ROM

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

Image

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_cdroms_get

Cdroms datacenters_servers_cdroms_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit)

List attached CD-ROMs

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

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    offset = 0 # int | 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 = 1000 # int | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
    try:
    # List attached CD-ROMs
    api_response = api_instance.datacenters_servers_cdroms_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_get: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    offset = 0 # int | 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 = 1000 # int | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
    try:
    # List attached CD-ROMs
    api_response = api_instance.datacenters_servers_cdroms_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number, offset=offset, limit=limit)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_get: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the Datacenter

server_id

str

The unique ID of the Server

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

offset

int

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

int

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

[optional] [default to 1000]

Return type

Cdroms

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_cdroms_post

Image datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Attach 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

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    cdrom = ionoscloud.Image() # Image | CD-ROM to be attached
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Attach a CD-ROM
    api_response = api_instance.datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_post: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the Datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    cdrom = ionoscloud.Image() # Image | CD-ROM to be attached
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Attach a CD-ROM
    api_response = api_instance.datacenters_servers_cdroms_post(datacenter_id, server_id, cdrom, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_cdroms_post: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the Datacenter

server_id

str

The unique ID of the Server

cdrom

Image

CD-ROM to be attached

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

Image

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_delete

object datacenters_servers_delete(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

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

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Delete a Server
    api_response = api_instance.datacenters_servers_delete(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_delete: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Delete a Server
    api_response = api_instance.datacenters_servers_delete(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_delete: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the datacenter

server_id

str

The unique ID of the Server

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_find_by_id

Server datacenters_servers_find_by_id(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Retrieve a Server

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

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Retrieve a Server
    api_response = api_instance.datacenters_servers_find_by_id(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_find_by_id: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Retrieve a Server
    api_response = api_instance.datacenters_servers_find_by_id(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_find_by_id: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the datacenter

server_id

str

The unique ID of the Server

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_get

Servers datacenters_servers_get(datacenter_id, pretty=pretty, depth=depth, upgrade_needed=upgrade_needed, x_contract_number=x_contract_number, offset=offset, limit=limit)

List Servers

You can retrieve a list of servers within a datacenter

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    upgrade_needed = True # bool | It can be used to filter which servers can be upgraded which can not be upgraded. (optional)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    offset = 0 # int | 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 = 1000 # int | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
    try:
    # List Servers
    api_response = api_instance.datacenters_servers_get(datacenter_id, pretty=pretty, depth=depth, upgrade_needed=upgrade_needed, x_contract_number=x_contract_number, offset=offset, limit=limit)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_get: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    upgrade_needed = True # bool | It can be used to filter which servers can be upgraded which can not be upgraded. (optional)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    offset = 0 # int | 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 = 1000 # int | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
    try:
    # List Servers
    api_response = api_instance.datacenters_servers_get(datacenter_id, pretty=pretty, depth=depth, upgrade_needed=upgrade_needed, x_contract_number=x_contract_number, offset=offset, limit=limit)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_get: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the datacenter

pretty

bool

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

[optional] [default to True]

depth

int

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]

upgrade_needed

bool

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

[optional]

x_contract_number

int

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

[optional]

offset

int

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

int

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

[optional] [default to 1000]

Return type

Servers

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_patch

Server datacenters_servers_patch(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Partially modify a Server

You can use update attributes of a server

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the server
    server = ionoscloud.ServerProperties() # ServerProperties | Modified properties of Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Partially modify a Server
    api_response = api_instance.datacenters_servers_patch(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_patch: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the server
    server = ionoscloud.ServerProperties() # ServerProperties | Modified properties of Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Partially modify a Server
    api_response = api_instance.datacenters_servers_patch(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_patch: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the datacenter

server_id

str

The unique ID of the server

server

ServerProperties

Modified properties of Server

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_post

Server datacenters_servers_post(datacenter_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Create a Server

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

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server = ionoscloud.Server() # Server | Server to be created
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Create a Server
    api_response = api_instance.datacenters_servers_post(datacenter_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_post: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server = ionoscloud.Server() # Server | Server to be created
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Create a Server
    api_response = api_instance.datacenters_servers_post(datacenter_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_post: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the datacenter

server

Server

Server to be created

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_put

Server datacenters_servers_put(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Modify 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

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the server
    server = ionoscloud.Server() # Server | Modified Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Modify a Server
    api_response = api_instance.datacenters_servers_put(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_put: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the server
    server = ionoscloud.Server() # Server | Modified Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Modify a Server
    api_response = api_instance.datacenters_servers_put(datacenter_id, server_id, server, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_put: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the datacenter

server_id

str

The unique ID of the server

server

Server

Modified Server

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

Server

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_reboot_post

object datacenters_servers_reboot_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

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

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Reboot a Server
    api_response = api_instance.datacenters_servers_reboot_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_reboot_post: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Reboot a Server
    api_response = api_instance.datacenters_servers_reboot_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_reboot_post: %s\n' % e)

Parameters

Name

Type

Description

Notes

datacenter_id

str

The unique ID of the datacenter

server_id

str

The unique ID of the Server

pretty

bool

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

[optional] [default to True]

depth

int

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]

x_contract_number

int

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

[optional]

Return type

object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_start_post

object datacenters_servers_start_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Start a Server

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

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.ServerApi(api_client)
    datacenter_id = 'datacenter_id_example' # str | The unique ID of the datacenter
    server_id = 'server_id_example' # str | The unique ID of the Server
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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)
    x_contract_number = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Start a Server
    api_response = api_instance.datacenters_servers_start_post(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling ServerApi.datacenters_servers_start_post: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(