This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Create Virtual Server

1 - 1.3

post /v1/servers

Description

Create Virtual Server.

State ACTIVE (CURRENT)

VersionNot Before
1.3-

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

ServerCreateRequestV1Dot2

Responses

HTTP CodeDescriptionSchema
202AcceptedServerCreateResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone
404Not FoundNone
409ConflictNone

Example HTTP request

Request path

/v1/servers

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = virtualserver 1.3"

Request body

{
    "file_storage_ids": [
        "96d258ea-dd5d-4cca-bb3a-b6909b7e2065",
        "949bd9c7-2098-4284-9685-13268d193117"
    ],
    "image_id": "70a599e0-31e7-49b7-b260-868f441e862b",
    "keypair_name": "keypairname",
    "lock": false,
    "max_count": 2,
    "metadata": "",
    "name": "servername",
    "networks": [
        {
            "fixed_ip": "192.169.3.2",
            "port_id": "91424c08-0b26-49fb-9808-ed042292ceef",
            "public_ip_id": "615fa9cd5cff486c9de679b3ce63e601",
            "subnet_id": "78b2ee3f074145c580ab6abac4821f97"
        }
    ],
    "partition_number": 1,
    "product_category": "compute",
    "product_offering": "virtual_server",
    "security_groups": [
        "c09c3f05-03d9-443f-b27a-40e0f973c75f"
    ],
    "server_group_id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
    "server_type_id": "s1v1m2",
    "tags": [
        {
            "key": "key",
            "value": "value"
        }
    ],
    "user_data": "IyEvYmluL2Jhc2gKL2Jpbi9zdQplY2hvICJJIGFtIGluIHlvdSEiCg==",
    "volumes": [
        {
            "boot_index": 0,
            "delete_on_termination": false,
            "max_iops": 10000,
            "max_throughput": 500,
            "size": 104,
            "source_type": "image",
            "type": "SSD"
        }
    ]
}

Example HTTP response

Response 202

{
    "servers": [
        {
            "id": "2a9be312-5d4b-4bc8-b2ae-35100fa9241f"
        }
    ]
}

2 - 1.2

post /v1/servers

Description

Create Virtual Server.

State ACTIVE (SUPPORTED)

VersionNot Before
1.220260831

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

ServerCreateRequestV1Dot2

Responses

HTTP CodeDescriptionSchema
202AcceptedServerCreateResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone
404Not FoundNone
409ConflictNone

Example HTTP request

Request path

/v1/servers

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = virtualserver 1.2"

Request body

{
    "file_storage_ids": [
        "96d258ea-dd5d-4cca-bb3a-b6909b7e2065",
        "949bd9c7-2098-4284-9685-13268d193117"
    ],
    "image_id": "70a599e0-31e7-49b7-b260-868f441e862b",
    "keypair_name": "keypairname",
    "lock": false,
    "max_count": 2,
    "metadata": "",
    "name": "servername",
    "networks": [
        {
            "fixed_ip": "192.169.3.2",
            "port_id": "91424c08-0b26-49fb-9808-ed042292ceef",
            "public_ip_id": "615fa9cd5cff486c9de679b3ce63e601",
            "subnet_id": "78b2ee3f074145c580ab6abac4821f97"
        }
    ],
    "partition_number": 1,
    "product_category": "compute",
    "product_offering": "virtual_server",
    "security_groups": [
        "c09c3f05-03d9-443f-b27a-40e0f973c75f"
    ],
    "server_group_id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
    "server_type_id": "s1v1m2",
    "tags": [
        {
            "key": "key",
            "value": "value"
        }
    ],
    "user_data": "IyEvYmluL2Jhc2gKL2Jpbi9zdQplY2hvICJJIGFtIGluIHlvdSEiCg==",
    "volumes": [
        {
            "boot_index": 0,
            "delete_on_termination": false,
            "max_iops": 10000,
            "max_throughput": 500,
            "size": 104,
            "source_type": "image",
            "type": "SSD"
        }
    ]
}

Example HTTP response

Response 202

{
    "servers": [
        {
            "id": "2a9be312-5d4b-4bc8-b2ae-35100fa9241f"
        }
    ]
}

3 - 1.1

post /v1/servers

Description

Create Virtual Server.

State ACTIVE (DEPRECATED)

Deprecated versions with Not Before dates that have arrived or expired are no longer supported. We recommend using the latest version.

VersionNot Before
1.120260531

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

ServerCreateRequest

Responses

HTTP CodeDescriptionSchema
202AcceptedServerCreateResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone
404Not FoundNone
409ConflictNone

Example HTTP request

Request path

/v1/servers

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = virtualserver 1.1"

Request body

{
    "image_id": "70a599e0-31e7-49b7-b260-868f441e862b",
    "keypair_name": "keypairname",
    "lock": false,
    "max_count": 2,
    "metadata": "",
    "name": "servername",
    "networks": [
        {
            "fixed_ip": "192.169.3.2",
            "port_id": "91424c08-0b26-49fb-9808-ed042292ceef",
            "public_ip_id": "615fa9cd5cff486c9de679b3ce63e601",
            "subnet_id": "78b2ee3f074145c580ab6abac4821f97"
        }
    ],
    "partition_number": 1,
    "product_category": "compute",
    "product_offering": "virtual_server",
    "security_groups": [
        "c09c3f05-03d9-443f-b27a-40e0f973c75f"
    ],
    "server_group_id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
    "server_type_id": "s1v1m2",
    "tags": [
        {
            "key": "key",
            "value": "value"
        }
    ],
    "user_data": "IyEvYmluL2Jhc2gKL2Jpbi9zdQplY2hvICJJIGFtIGluIHlvdSEiCg==",
    "volumes": []
}

Example HTTP response

Response 202

{
    "servers": [
        {
            "id": "2a9be312-5d4b-4bc8-b2ae-35100fa9241f"
        }
    ]
}

4 - 1.0

post /v1/servers

Description

Create Virtual Server.

State ACTIVE (DEPRECATED)

Deprecated versions with Not Before dates that have arrived or expired are no longer supported. We recommend using the latest version.

VersionNot Before
1.020251231

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

ServerCreateRequest

Responses

HTTP CodeDescriptionSchema
202AcceptedServerCreateResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone
404Not FoundNone
409ConflictNone

Example HTTP request

Request path

/v1/servers

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = virtualserver 1.0"

Request body

{
    "image_id": "70a599e0-31e7-49b7-b260-868f441e862b",
    "keypair_name": "keypairname",
    "lock": false,
    "max_count": 2,
    "metadata": "",
    "name": "servername",
    "networks": [
        {
            "fixed_ip": "192.169.3.2",
            "port_id": "91424c08-0b26-49fb-9808-ed042292ceef",
            "public_ip_id": "615fa9cd5cff486c9de679b3ce63e601",
            "subnet_id": "78b2ee3f074145c580ab6abac4821f97"
        }
    ],
    "partition_number": 1,
    "product_category": "compute",
    "product_offering": "virtual_server",
    "security_groups": [
        "c09c3f05-03d9-443f-b27a-40e0f973c75f"
    ],
    "server_group_id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
    "server_type_id": "s1v1m2",
    "tags": [
        {
            "key": "key",
            "value": "value"
        }
    ],
    "user_data": "IyEvYmluL2Jhc2gKL2Jpbi9zdQplY2hvICJJIGFtIGluIHlvdSEiCg==",
    "volumes": []
}

Example HTTP response

Response 202

{
    "servers": [
        {
            "id": "2a9be312-5d4b-4bc8-b2ae-35100fa9241f"
        }
    ]
}