Get a cluster
curl --request GET \
--url https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
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>"
}Clusters
Get a cluster
Gets the details of a cluster.
GET
/
v1
/
projects
/
{projectId}
/
clusters
/
{id}
Get a cluster
curl --request GET \
--url https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/projects/{projectId}/clusters/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
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.
Response
A successful response.
Available options:
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
Available options:
NETWORK_TYPE_UNSPECIFIED, ETHERNET, INFINIBAND Available options:
SSH_KEY_SOURCE_UNKNOWN, SSH_KEY_SOURCE_PROJECT, SSH_KEY_SOURCE_USER, SSH_KEY_SOURCE_NONE Available options:
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