February 15, 2015


Create virtual server

Example of how to create a new virtual server (VSI) through a POST API operation

Operation: POST

URL: SoftLayer_Virtual_Guest.json?objectMask=id

Example CURL:

curl -X POST --data @vs_create.json --user userid:api_key
https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest.json?objectMask=mask.id

Input JSON:

{
    "parameters" : [
        {
            "hostname" : "myhostname",
            "domain" : "my.domain.com",
            "startCpus" : 1,
            "maxMemory" : 1024,
            "datacenter" : {
                "name" : "wdc01"
                },
            "hourlyBillingFlag" : true,
            "localDiskFlag" : true,
            "operatingSystemReferenceCode": "UBUNTU_LATEST"
        }
    ]
}

Example Response:

{"id":7742740}