Estimated cost of a single deployment and its share of total fleet spend
curl --request GET \
--url http://localhost:3000/api/clusters/{clusterName}/cost \
--cookie token=import requests
url = "http://localhost:3000/api/clusters/{clusterName}/cost"
headers = {"cookie": "token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'token='}};
fetch('http://localhost:3000/api/clusters/{clusterName}/cost', 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 => "3000",
CURLOPT_URL => "http://localhost:3000/api/clusters/{clusterName}/cost",
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:3000/api/clusters/{clusterName}/cost"
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:3000/api/clusters/{clusterName}/cost")
.header("cookie", "token=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/clusters/{clusterName}/cost")
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{
"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"
],
"generatedAt": "2023-11-07T05:31:56Z",
"provider": "rate-card",
"configured": true,
"estimated": true,
"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>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Clusters
Estimated cost of a single deployment and its share of total fleet spend
GET
/
api
/
clusters
/
{clusterName}
/
cost
Estimated cost of a single deployment and its share of total fleet spend
curl --request GET \
--url http://localhost:3000/api/clusters/{clusterName}/cost \
--cookie token=import requests
url = "http://localhost:3000/api/clusters/{clusterName}/cost"
headers = {"cookie": "token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'token='}};
fetch('http://localhost:3000/api/clusters/{clusterName}/cost', 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 => "3000",
CURLOPT_URL => "http://localhost:3000/api/clusters/{clusterName}/cost",
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:3000/api/clusters/{clusterName}/cost"
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:3000/api/clusters/{clusterName}/cost")
.header("cookie", "token=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/clusters/{clusterName}/cost")
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{
"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"
],
"generatedAt": "2023-11-07T05:31:56Z",
"provider": "rate-card",
"configured": true,
"estimated": true,
"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>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Authorizations
JWT token stored in HTTP-only cookie
Path Parameters
Query Parameters
namespace is required
Minimum string length:
1Response
Default Response
Show child attributes
Show child attributes
Fraction of the fleet this database accounts for. Priced share when pricing is configured, otherwise share of reserved CPU cores.
Required range:
0 <= x <= 1Available options:
no-cpu-request Available options:
rate-card Available options:
true Show child attributes
Show child attributes
Was this page helpful?
⌘I