Get Resource
curl --request GET \
--url https://supply-api.compute-desk.com/resources/{resource_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://supply-api.compute-desk.com/resources/{resource_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://supply-api.compute-desk.com/resources/{resource_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://supply-api.compute-desk.com/resources/{resource_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: Bearer <token>"
],
]);
$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://supply-api.compute-desk.com/resources/{resource_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://supply-api.compute-desk.com/resources/{resource_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://supply-api.compute-desk.com/resources/{resource_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"vendor": "<string>",
"vendor_region": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"status_message": "<string>",
"access": {
"external_ip": "<string>",
"internal_ip": "<string>",
"ssh_command": "<string>",
"ssh_port": 123
},
"spec": {},
"linked_resources": [
{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"status": "<string>",
"link_type": "<string>",
"linked_since": "2023-11-07T05:31:56Z",
"name": "<string>",
"linked_until": "2023-11-07T05:31:56Z"
}
],
"offer_history": [
{
"offer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"offer_type": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pricing_total_hourly": 123,
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Resources
Get Resource
Get detailed resource view including offer history.
Triggers a vendor state reconciliation if last_synced_at is older than 30 seconds. Use force_refresh=true to bypass the cooldown.
GET
/
resources
/
{resource_id}
Get Resource
curl --request GET \
--url https://supply-api.compute-desk.com/resources/{resource_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://supply-api.compute-desk.com/resources/{resource_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://supply-api.compute-desk.com/resources/{resource_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://supply-api.compute-desk.com/resources/{resource_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: Bearer <token>"
],
]);
$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://supply-api.compute-desk.com/resources/{resource_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://supply-api.compute-desk.com/resources/{resource_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://supply-api.compute-desk.com/resources/{resource_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"vendor": "<string>",
"vendor_region": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"status_message": "<string>",
"access": {
"external_ip": "<string>",
"internal_ip": "<string>",
"ssh_command": "<string>",
"ssh_port": 123
},
"spec": {},
"linked_resources": [
{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"status": "<string>",
"link_type": "<string>",
"linked_since": "2023-11-07T05:31:56Z",
"name": "<string>",
"linked_until": "2023-11-07T05:31:56Z"
}
],
"offer_history": [
{
"offer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"offer_type": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"pricing_total_hourly": 123,
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Returns details for a single resource including connection info (IP, SSH command) and current status.
Force refresh
Pass?force_refresh=true to trigger a live vendor poll instead of using cached state. This is useful when you need the most up-to-date status immediately after an operation.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Response
Successful Response
Summary of a user-level resource (for list endpoint).
Connection details for a resource (populated from vendor item outputs).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes