Create an Instance
4 min
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 api https //api ionos com/docs/cloud/v6/#tag/servers requests 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 https //docs ionos com/cloud/backup and storage/images snapshots/public images , private images https //docs ionos com/cloud/backup and storage/images snapshots/private images , or snapshots https //docs ionos com/cloud/backup and storage/images snapshots/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 { "id" "15f67991 0f51 4efc a8ad ef1fb31a480c", "type" "server", "href" "\<resource uri>", "metadata" { "etag" "45480eb3fbfc31f1d916c1eaa4abdcc3", "createddate" "2015 12 04t14 34 09 809z", "createdby" "user\@example com", "createdbyuserid" "user\@example com", "lastmodifieddate" "2015 12 04t14 34 09 809z", "lastmodifiedby" "user\@example com", "lastmodifiedbyuserid" "63cef532 26fe 4a64 a4e0 de7c8a506c90", "state" "available" }, "properties" { "templateuuid" "15f67991 0f51 4efc a8ad ef1fb31a480c", "name" "my resource", "hostname" "myhostname", "cores" 4, "ram" 4096, "availabilityzone" "auto", "vmstate" "running", "bootcdrom" { "id" "string", "type" "resource", "href" "\<resource uri>" }, "bootvolume" { "id" "string", "type" "resource", "href" "\<resource uri>" }, "cpufamily" "intel icelake", "type" "cube", "nicmultiqueue" true }, "entities" { "volumes" { "items" \[ { "properties" { "name" "my resource", "type" "das", "licencetype" "linux" } } ] } } }
