Estimated cost of every deployment the caller can see, plus fleet totals
curl --request GET \
--url http://localhost:3001/api/clusters/costs \
--cookie token=import requests
url = "http://localhost:3001/api/clusters/costs"
headers = {"cookie": "token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'token='}};
fetch('http://localhost:3001/api/clusters/costs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/costs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "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 := "http://localhost:3001/api/clusters/costs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/api/clusters/costs")
.header("cookie", "token=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/costs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["cookie"] = 'token='
response = http.request(request)
puts response.read_body{
"generatedAt": "2023-11-07T05:31:56Z",
"provider": "rate-card",
"configured": true,
"estimated": true,
"totals": {
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"components": [
{
"component": "<string>",
"replicas": 1,
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"storageClass": "<string>"
}
]
},
"databases": [
{
"name": "<string>",
"namespace": "<string>",
"footprint": {
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"components": [
{
"component": "<string>",
"replicas": 1,
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"storageClass": "<string>"
}
]
},
"shareOfTotal": 0.5,
"warnings": [
"no-cpu-request"
],
"topology": "<string>",
"cost": {
"cpu": {
"hourly": 1,
"monthly": 1
},
"memory": {
"hourly": 1,
"monthly": 1
},
"storage": {
"hourly": 1,
"monthly": 1
},
"total": {
"hourly": 1,
"monthly": 1
}
}
}
],
"currency": "<string>",
"cost": {
"cpu": {
"hourly": 1,
"monthly": 1
},
"memory": {
"hourly": 1,
"monthly": 1
},
"storage": {
"hourly": 1,
"monthly": 1
},
"total": {
"hourly": 1,
"monthly": 1
}
}
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Clusters
Estimated cost of every deployment the caller can see, plus fleet totals
Estimated cost of every deployment the caller can see, plus fleet totals. Costs are modelled from reserved capacity and operator-supplied prices, never read from a bill.
GET
/
api
/
clusters
/
costs
Estimated cost of every deployment the caller can see, plus fleet totals
curl --request GET \
--url http://localhost:3001/api/clusters/costs \
--cookie token=import requests
url = "http://localhost:3001/api/clusters/costs"
headers = {"cookie": "token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'token='}};
fetch('http://localhost:3001/api/clusters/costs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/costs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "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 := "http://localhost:3001/api/clusters/costs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/api/clusters/costs")
.header("cookie", "token=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/costs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["cookie"] = 'token='
response = http.request(request)
puts response.read_body{
"generatedAt": "2023-11-07T05:31:56Z",
"provider": "rate-card",
"configured": true,
"estimated": true,
"totals": {
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"components": [
{
"component": "<string>",
"replicas": 1,
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"storageClass": "<string>"
}
]
},
"databases": [
{
"name": "<string>",
"namespace": "<string>",
"footprint": {
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"components": [
{
"component": "<string>",
"replicas": 1,
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"storageClass": "<string>"
}
]
},
"shareOfTotal": 0.5,
"warnings": [
"no-cpu-request"
],
"topology": "<string>",
"cost": {
"cpu": {
"hourly": 1,
"monthly": 1
},
"memory": {
"hourly": 1,
"monthly": 1
},
"storage": {
"hourly": 1,
"monthly": 1
},
"total": {
"hourly": 1,
"monthly": 1
}
}
}
],
"currency": "<string>",
"cost": {
"cpu": {
"hourly": 1,
"monthly": 1
},
"memory": {
"hourly": 1,
"monthly": 1
},
"storage": {
"hourly": 1,
"monthly": 1
},
"total": {
"hourly": 1,
"monthly": 1
}
}
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Response
Default Response
Was this page helpful?