Search accessible resources
curl --request GET \
--url https://rest.compute.cudo.org/v1/resources/search \
--header 'Authorization: <api-key>'import requests
url = "https://rest.compute.cudo.org/v1/resources/search"
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/resources/search', 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/resources/search",
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/resources/search"
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/resources/search")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/resources/search")
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{
"results": [
{
"billingAccount": {
"createTime": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"id": "<string>"
},
"cluster": {
"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>"
}
},
"disk": {
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123,
"createTime": "2023-11-07T05:31:56Z",
"diskState": "UNKNOWN",
"diskType": "DISK_TYPE_UNKNOWN",
"privateImageId": "<string>",
"publicImageId": "<string>",
"vmId": "<string>"
},
"image": {
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123
},
"machine": {
"architecture": "<string>",
"cpuCores": 123,
"cpuModel": "<string>",
"cpuSpeedMhz": 123,
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"diskSizeGib": 123,
"disks": 123,
"externalIpAddresses": [
"<string>"
],
"gpuModelId": "<string>",
"gpus": 123,
"id": "<string>",
"ipv4Addresses": 123,
"machineTypeId": "<string>",
"memoryGib": 123,
"os": "<string>",
"powerState": "MACHINE_POWER_STATE_UNSPECIFIED",
"projectId": "<string>",
"state": "STATE_UNSPECIFIED"
},
"network": {
"dataCenterId": "<string>",
"id": "<string>",
"ipRange": "<string>",
"projectId": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"externalIpAddress": "<string>",
"gateway": "<string>",
"internalIpAddress": "<string>",
"priceHr": {
"value": "<string>"
},
"state": "STATE_UNKNOWN",
"vmState": "CLONING"
},
"project": {
"billingAccountId": "<string>",
"id": "<string>",
"createBy": "<string>",
"resourceCount": 123
},
"resourceName": "<string>",
"resourceType": "<string>",
"score": 123,
"virtualMachine": {
"bootDiskPrivateImageId": "<string>",
"bootDiskPublicImageId": "<string>",
"bootDiskSizeGib": 123,
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"gpuModelId": "<string>",
"gpus": 123,
"id": "<string>",
"memoryGib": 123,
"projectId": "<string>",
"state": "CLONING",
"vcpus": 123
},
"volume": {
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": {
"value": "<string>"
},
"nfsPath": "<string>",
"nfsServer": "<string>",
"sizeGibUsed": 123,
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": {
"value": "<string>"
}
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Resources
Search accessible resources
Search for resources that can be accessed by the current user. The query string is used to match against resource names and other relevant fields.
GET
/
v1
/
resources
/
search
Search accessible resources
curl --request GET \
--url https://rest.compute.cudo.org/v1/resources/search \
--header 'Authorization: <api-key>'import requests
url = "https://rest.compute.cudo.org/v1/resources/search"
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/resources/search', 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/resources/search",
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/resources/search"
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/resources/search")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.compute.cudo.org/v1/resources/search")
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{
"results": [
{
"billingAccount": {
"createTime": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"id": "<string>"
},
"cluster": {
"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>"
}
},
"disk": {
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123,
"createTime": "2023-11-07T05:31:56Z",
"diskState": "UNKNOWN",
"diskType": "DISK_TYPE_UNKNOWN",
"privateImageId": "<string>",
"publicImageId": "<string>",
"vmId": "<string>"
},
"image": {
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123
},
"machine": {
"architecture": "<string>",
"cpuCores": 123,
"cpuModel": "<string>",
"cpuSpeedMhz": 123,
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"diskSizeGib": 123,
"disks": 123,
"externalIpAddresses": [
"<string>"
],
"gpuModelId": "<string>",
"gpus": 123,
"id": "<string>",
"ipv4Addresses": 123,
"machineTypeId": "<string>",
"memoryGib": 123,
"os": "<string>",
"powerState": "MACHINE_POWER_STATE_UNSPECIFIED",
"projectId": "<string>",
"state": "STATE_UNSPECIFIED"
},
"network": {
"dataCenterId": "<string>",
"id": "<string>",
"ipRange": "<string>",
"projectId": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"externalIpAddress": "<string>",
"gateway": "<string>",
"internalIpAddress": "<string>",
"priceHr": {
"value": "<string>"
},
"state": "STATE_UNKNOWN",
"vmState": "CLONING"
},
"project": {
"billingAccountId": "<string>",
"id": "<string>",
"createBy": "<string>",
"resourceCount": 123
},
"resourceName": "<string>",
"resourceType": "<string>",
"score": 123,
"virtualMachine": {
"bootDiskPrivateImageId": "<string>",
"bootDiskPublicImageId": "<string>",
"bootDiskSizeGib": 123,
"createTime": "2023-11-07T05:31:56Z",
"dataCenterId": "<string>",
"gpuModelId": "<string>",
"gpus": 123,
"id": "<string>",
"memoryGib": 123,
"projectId": "<string>",
"state": "CLONING",
"vcpus": 123
},
"volume": {
"dataCenterId": "<string>",
"id": "<string>",
"projectId": "<string>",
"sizeGib": 123,
"commitmentEndTime": "2023-11-07T05:31:56Z",
"commitmentTerm": "COMMITMENT_TERM_NONE",
"gibPriceHr": {
"value": "<string>"
},
"nfsPath": "<string>",
"nfsServer": "<string>",
"sizeGibUsed": 123,
"state": "VOLUME_STATE_UNSPECIFIED",
"totalPriceHr": {
"value": "<string>"
}
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}⌘I