curl --request POST \
--url https://rest.compute.cudo.org/v1/projects/{projectId}/clusters \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dataCenterId": "<string>",
"id": "<string>",
"machineCount": 123,
"machineTypeId": "<string>",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"customSshKeys": [
"<string>"
],
"machinePriceHr": {
"value": "<string>"
},
"networkType": "NETWORK_TYPE_UNSPECIFIED",
"sshKeySource": "SSH_KEY_SOURCE_UNKNOWN",
"startScript": "<string>",
"state": "STATE_UNSPECIFIED",
"totalMachinePriceHr": {
"value": "<string>"
},
"totalPriceHr": {
"value": "<string>"
}
}
'import requests
url = "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters"
payload = {
"dataCenterId": "<string>",
"id": "<string>",
"machineCount": 123,
"machineTypeId": "<string>",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"customSshKeys": ["<string>"],
"machinePriceHr": { "value": "<string>" },
"networkType": "NETWORK_TYPE_UNSPECIFIED",
"sshKeySource": "SSH_KEY_SOURCE_UNKNOWN",
"startScript": "<string>",
"state": "STATE_UNSPECIFIED",
"totalMachinePriceHr": { "value": "<string>" },
"totalPriceHr": { "value": "<string>" }
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataCenterId: '<string>',
id: '<string>',
machineCount: 123,
machineTypeId: '<string>',
commitmentTerm: 'COMMITMENT_TERM_NONE',
customSshKeys: ['<string>'],
machinePriceHr: {value: '<string>'},
networkType: 'NETWORK_TYPE_UNSPECIFIED',
sshKeySource: 'SSH_KEY_SOURCE_UNKNOWN',
startScript: '<string>',
state: 'STATE_UNSPECIFIED',
totalMachinePriceHr: {value: '<string>'},
totalPriceHr: {value: '<string>'}
})
};
fetch('https://rest.compute.cudo.org/v1/projects/{projectId}/clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataCenterId' => '<string>',
'id' => '<string>',
'machineCount' => 123,
'machineTypeId' => '<string>',
'commitmentTerm' => 'COMMITMENT_TERM_NONE',
'customSshKeys' => [
'<string>'
],
'machinePriceHr' => [
'value' => '<string>'
],
'networkType' => 'NETWORK_TYPE_UNSPECIFIED',
'sshKeySource' => 'SSH_KEY_SOURCE_UNKNOWN',
'startScript' => '<string>',
'state' => 'STATE_UNSPECIFIED',
'totalMachinePriceHr' => [
'value' => '<string>'
],
'totalPriceHr' => [
'value' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters"
payload := strings.NewReader("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"machineCount\": 123,\n \"machineTypeId\": \"<string>\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"customSshKeys\": [\n \"<string>\"\n ],\n \"machinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"networkType\": \"NETWORK_TYPE_UNSPECIFIED\",\n \"sshKeySource\": \"SSH_KEY_SOURCE_UNKNOWN\",\n \"startScript\": \"<string>\",\n \"state\": \"STATE_UNSPECIFIED\",\n \"totalMachinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"machineCount\": 123,\n \"machineTypeId\": \"<string>\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"customSshKeys\": [\n \"<string>\"\n ],\n \"machinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"networkType\": \"NETWORK_TYPE_UNSPECIFIED\",\n \"sshKeySource\": \"SSH_KEY_SOURCE_UNKNOWN\",\n \"startScript\": \"<string>\",\n \"state\": \"STATE_UNSPECIFIED\",\n \"totalMachinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"machineCount\": 123,\n \"machineTypeId\": \"<string>\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"customSshKeys\": [\n \"<string>\"\n ],\n \"machinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"networkType\": \"NETWORK_TYPE_UNSPECIFIED\",\n \"sshKeySource\": \"SSH_KEY_SOURCE_UNKNOWN\",\n \"startScript\": \"<string>\",\n \"state\": \"STATE_UNSPECIFIED\",\n \"totalMachinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"dataCenterId": "<string>",
"id": "<string>",
"machineCount": 123,
"machineTypeId": "<string>",
"projectId": "<string>",
"architecture": "<string>",
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"cpuModel": "<string>",
"cpuSpeedMhz": 123,
"createBy": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"customSshKeys": [
"<string>"
],
"gpuModelId": "<string>",
"ipoibConfig": {
"hostBits": 123,
"networkPrefix": "<string>",
"portBits": 123
},
"machinePriceHr": {
"value": "<string>"
},
"machines": [
{
"architecture": "<string>",
"cpuCores": 123,
"cpuModel": "<string>",
"cpuSpeedMhz": 123,
"createBy": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"diskSizeGib": 123,
"disks": 123,
"externalIpAddress": "<string>",
"gpuModelId": "<string>",
"gpus": 123,
"id": "<string>",
"internalIpAddress": "<string>",
"machineTypeId": "<string>",
"memoryGib": 123,
"powerState": "MACHINE_POWER_STATE_UNSPECIFIED",
"priceHr": {
"value": "<string>"
},
"projectId": "<string>",
"state": "STATE_UNSPECIFIED",
"volumeIds": [
"<string>"
]
}
],
"networkType": "NETWORK_TYPE_UNSPECIFIED",
"sshKeySource": "SSH_KEY_SOURCE_UNKNOWN",
"startScript": "<string>",
"state": "STATE_UNSPECIFIED",
"totalCpuCores": 123,
"totalDiskSizeGib": 123,
"totalGpus": 123,
"totalMachinePriceHr": {
"value": "<string>"
},
"totalMemoryGib": 123,
"totalPriceHr": {
"value": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Create a cluster
Creates a new cluster.
curl --request POST \
--url https://rest.compute.cudo.org/v1/projects/{projectId}/clusters \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dataCenterId": "<string>",
"id": "<string>",
"machineCount": 123,
"machineTypeId": "<string>",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"customSshKeys": [
"<string>"
],
"machinePriceHr": {
"value": "<string>"
},
"networkType": "NETWORK_TYPE_UNSPECIFIED",
"sshKeySource": "SSH_KEY_SOURCE_UNKNOWN",
"startScript": "<string>",
"state": "STATE_UNSPECIFIED",
"totalMachinePriceHr": {
"value": "<string>"
},
"totalPriceHr": {
"value": "<string>"
}
}
'import requests
url = "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters"
payload = {
"dataCenterId": "<string>",
"id": "<string>",
"machineCount": 123,
"machineTypeId": "<string>",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"customSshKeys": ["<string>"],
"machinePriceHr": { "value": "<string>" },
"networkType": "NETWORK_TYPE_UNSPECIFIED",
"sshKeySource": "SSH_KEY_SOURCE_UNKNOWN",
"startScript": "<string>",
"state": "STATE_UNSPECIFIED",
"totalMachinePriceHr": { "value": "<string>" },
"totalPriceHr": { "value": "<string>" }
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataCenterId: '<string>',
id: '<string>',
machineCount: 123,
machineTypeId: '<string>',
commitmentTerm: 'COMMITMENT_TERM_NONE',
customSshKeys: ['<string>'],
machinePriceHr: {value: '<string>'},
networkType: 'NETWORK_TYPE_UNSPECIFIED',
sshKeySource: 'SSH_KEY_SOURCE_UNKNOWN',
startScript: '<string>',
state: 'STATE_UNSPECIFIED',
totalMachinePriceHr: {value: '<string>'},
totalPriceHr: {value: '<string>'}
})
};
fetch('https://rest.compute.cudo.org/v1/projects/{projectId}/clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataCenterId' => '<string>',
'id' => '<string>',
'machineCount' => 123,
'machineTypeId' => '<string>',
'commitmentTerm' => 'COMMITMENT_TERM_NONE',
'customSshKeys' => [
'<string>'
],
'machinePriceHr' => [
'value' => '<string>'
],
'networkType' => 'NETWORK_TYPE_UNSPECIFIED',
'sshKeySource' => 'SSH_KEY_SOURCE_UNKNOWN',
'startScript' => '<string>',
'state' => 'STATE_UNSPECIFIED',
'totalMachinePriceHr' => [
'value' => '<string>'
],
'totalPriceHr' => [
'value' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters"
payload := strings.NewReader("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"machineCount\": 123,\n \"machineTypeId\": \"<string>\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"customSshKeys\": [\n \"<string>\"\n ],\n \"machinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"networkType\": \"NETWORK_TYPE_UNSPECIFIED\",\n \"sshKeySource\": \"SSH_KEY_SOURCE_UNKNOWN\",\n \"startScript\": \"<string>\",\n \"state\": \"STATE_UNSPECIFIED\",\n \"totalMachinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"machineCount\": 123,\n \"machineTypeId\": \"<string>\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"customSshKeys\": [\n \"<string>\"\n ],\n \"machinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"networkType\": \"NETWORK_TYPE_UNSPECIFIED\",\n \"sshKeySource\": \"SSH_KEY_SOURCE_UNKNOWN\",\n \"startScript\": \"<string>\",\n \"state\": \"STATE_UNSPECIFIED\",\n \"totalMachinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataCenterId\": \"<string>\",\n \"id\": \"<string>\",\n \"machineCount\": 123,\n \"machineTypeId\": \"<string>\",\n \"commitmentTerm\": \"COMMITMENT_TERM_NONE\",\n \"customSshKeys\": [\n \"<string>\"\n ],\n \"machinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"networkType\": \"NETWORK_TYPE_UNSPECIFIED\",\n \"sshKeySource\": \"SSH_KEY_SOURCE_UNKNOWN\",\n \"startScript\": \"<string>\",\n \"state\": \"STATE_UNSPECIFIED\",\n \"totalMachinePriceHr\": {\n \"value\": \"<string>\"\n },\n \"totalPriceHr\": {\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"dataCenterId": "<string>",
"id": "<string>",
"machineCount": 123,
"machineTypeId": "<string>",
"projectId": "<string>",
"architecture": "<string>",
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"cpuModel": "<string>",
"cpuSpeedMhz": 123,
"createBy": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"customSshKeys": [
"<string>"
],
"gpuModelId": "<string>",
"ipoibConfig": {
"hostBits": 123,
"networkPrefix": "<string>",
"portBits": 123
},
"machinePriceHr": {
"value": "<string>"
},
"machines": [
{
"architecture": "<string>",
"cpuCores": 123,
"cpuModel": "<string>",
"cpuSpeedMhz": 123,
"createBy": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"diskSizeGib": 123,
"disks": 123,
"externalIpAddress": "<string>",
"gpuModelId": "<string>",
"gpus": 123,
"id": "<string>",
"internalIpAddress": "<string>",
"machineTypeId": "<string>",
"memoryGib": 123,
"powerState": "MACHINE_POWER_STATE_UNSPECIFIED",
"priceHr": {
"value": "<string>"
},
"projectId": "<string>",
"state": "STATE_UNSPECIFIED",
"volumeIds": [
"<string>"
]
}
],
"networkType": "NETWORK_TYPE_UNSPECIFIED",
"sshKeySource": "SSH_KEY_SOURCE_UNKNOWN",
"startScript": "<string>",
"state": "STATE_UNSPECIFIED",
"totalCpuCores": 123,
"totalDiskSizeGib": 123,
"totalGpus": 123,
"totalMachinePriceHr": {
"value": "<string>"
},
"totalMemoryGib": 123,
"totalPriceHr": {
"value": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
API key authentication. API keys should be passed using the format Bearer API_KEY.
Path Parameters
Body
Create cluster params
COMMITMENT_TERM_NONE, COMMITMENT_TERM_1_MONTH, COMMITMENT_TERM_3_MONTHS, COMMITMENT_TERM_6_MONTHS, COMMITMENT_TERM_12_MONTHS, COMMITMENT_TERM_24_MONTHS, COMMITMENT_TERM_36_MONTHS, COMMITMENT_TERM_60_MONTHS Show child attributes
Show child attributes
A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
NETWORK_TYPE_UNSPECIFIED, ETHERNET, INFINIBAND SSH_KEY_SOURCE_UNKNOWN, SSH_KEY_SOURCE_PROJECT, SSH_KEY_SOURCE_USER, SSH_KEY_SOURCE_NONE STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, FAILED A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
Response
A successful response.
COMMITMENT_TERM_NONE, COMMITMENT_TERM_1_MONTH, COMMITMENT_TERM_3_MONTHS, COMMITMENT_TERM_6_MONTHS, COMMITMENT_TERM_12_MONTHS, COMMITMENT_TERM_24_MONTHS, COMMITMENT_TERM_36_MONTHS, COMMITMENT_TERM_60_MONTHS Show child attributes
Show child attributes
A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
NETWORK_TYPE_UNSPECIFIED, ETHERNET, INFINIBAND SSH_KEY_SOURCE_UNKNOWN, SSH_KEY_SOURCE_PROJECT, SSH_KEY_SOURCE_USER, SSH_KEY_SOURCE_NONE STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, FAILED A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes
A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
Show child attributes
Show child attributes