Create an Instance

You can create an instance in a specific data center with a composite call. A composite call doesn't only configure a single instance but also defines additional devices. This is required because a Cube must include a direct-attached storage device. An instance cannot be provisioned and then mounted with a direct-attached storage volume. Composite calls are used to execute a series of REST APIrequests into a single API call. You can use the output of one request as the input for a subsequent request.

The payload of a composite call to configure a Cubes instance differs from that of a POST request to create an enterprise server. In a single request, you can create a new instance and its direct-attached storage device and image (public images, private images, or snapshots). When the request is processed, a Cubes instance is created and the direct-attached storage is mounted automatically.

Endpoint

Use the following endpoint for Cubes: https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/servers

Request

Note: The following request contains sample values. Remember to replace them with the relevant information.

curl -X 'POST' \
  'https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/servers' \
  -H 'accept: application/json'

To make authenticated requests to the API, the following fields are mandatory in the request header:

Name

Type

Description

datacenterId

string

The ID of the data center.

serverId

string

The ID of the Cube.

Response

A 202 message confirms that the instance is created.

Last updated

Was this helpful?