Hello,
I want to create more Servers and Disks at one with one Request. I have allready done one server by request. But the downside of doing it per one request the requests are getting processed sequential. Creation takes therefore much more time, as if done in the DCD at once.
Can you help me to crate the right REST request for more than one server at time (If possible)?
Following a Sample:
!/bin/bash
User=firstname.lastname@example:passwort
User=firstname.lastname@example:passwort VDC=DataCenterUID
curl -s --include --request POST --user $User --header 'Content-Type: application/vnd.profitbricks.resource+json' --data-binary ' { "properties": { "name": "SAMPLESERVER1", "ram": 8192, "cores": 2 }, "entities": { "volumes": { "items": [ { "properties": { "name" : "SAMPLESERVER1 System", "type" : "HDD", "size" : 30, "image" : "ImageUID1", "type": "HDD" } }, { "properties": { "name" : "SAMPLESERVER1 DATA", "type" : "HDD", "size" : 70, "image" : "ImageUID2", "type": "HDD" } } ] }, "nics" : { "items": [ { "properties" : { "name" : null, "ips" : [ "10.10.10.100" ], "dhcp" : true, "lan" : 3, "firewallActive" : false, "nat" : false } }, { "properties" : { "name" : null, "ips" : [ "xxx.xxx.xxx.xxx" ], "dhcp" : true, "lan" : 2, "firewallActive" : false, "nat" : false } } ] } <br/> } }' https://api.profitbricks.com/cloudapi/v3/datacenters/$VDC/servers
Thanks for your help!