Estimate the cost of a prospective deployment spec, for create and scale flows
curl --request POST \
--url http://localhost:3000/api/clusters/costs/estimate \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"topology": "standalone",
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
},
"sentinel": {
"enabled": true,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
},
"sharding": {
"enabled": true,
"shardCount": 1,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
}
}
'import requests
url = "http://localhost:3000/api/clusters/costs/estimate"
payload = {
"topology": "standalone",
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
},
"sentinel": {
"enabled": True,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
},
"sharding": {
"enabled": True,
"shardCount": 1,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
}
}
headers = {
"cookie": "token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
topology: 'standalone',
replicas: 1,
resources: {
limits: {cpu: '<string>', memory: '<string>'},
requests: {cpu: '<string>', memory: '<string>'}
},
sentinel: {
enabled: true,
replicas: 1,
resources: {
limits: {cpu: '<string>', memory: '<string>'},
requests: {cpu: '<string>', memory: '<string>'}
}
},
sharding: {
enabled: true,
shardCount: 1,
replicas: 1,
resources: {
limits: {cpu: '<string>', memory: '<string>'},
requests: {cpu: '<string>', memory: '<string>'}
}
}
})
};
fetch('http://localhost:3000/api/clusters/costs/estimate', 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/costs/estimate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'topology' => 'standalone',
'replicas' => 1,
'resources' => [
'limits' => [
'cpu' => '<string>',
'memory' => '<string>'
],
'requests' => [
'cpu' => '<string>',
'memory' => '<string>'
]
],
'sentinel' => [
'enabled' => true,
'replicas' => 1,
'resources' => [
'limits' => [
'cpu' => '<string>',
'memory' => '<string>'
],
'requests' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]
],
'sharding' => [
'enabled' => true,
'shardCount' => 1,
'replicas' => 1,
'resources' => [
'limits' => [
'cpu' => '<string>',
'memory' => '<string>'
],
'requests' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]
]
]),
CURLOPT_COOKIE => "token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/clusters/costs/estimate"
payload := strings.NewReader("{\n \"topology\": \"standalone\",\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n },\n \"sentinel\": {\n \"enabled\": true,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n },\n \"sharding\": {\n \"enabled\": true,\n \"shardCount\": 1,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "token=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/clusters/costs/estimate")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"topology\": \"standalone\",\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n },\n \"sentinel\": {\n \"enabled\": true,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n },\n \"sharding\": {\n \"enabled\": true,\n \"shardCount\": 1,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/clusters/costs/estimate")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"topology\": \"standalone\",\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n },\n \"sentinel\": {\n \"enabled\": true,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n },\n \"sharding\": {\n \"enabled\": true,\n \"shardCount\": 1,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"provider": "rate-card",
"configured": true,
"estimated": true,
"footprint": {
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"components": [
{
"component": "<string>",
"replicas": 1,
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"storageClass": "<string>"
}
]
},
"warnings": [
"no-cpu-request"
],
"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
Estimate the cost of a prospective deployment spec, for create and scale flows
Estimate the cost of a prospective deployment spec, for create and scale flows. Reads no existing deployments.
POST
/
api
/
clusters
/
costs
/
estimate
Estimate the cost of a prospective deployment spec, for create and scale flows
curl --request POST \
--url http://localhost:3000/api/clusters/costs/estimate \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"topology": "standalone",
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
},
"sentinel": {
"enabled": true,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
},
"sharding": {
"enabled": true,
"shardCount": 1,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
}
}
'import requests
url = "http://localhost:3000/api/clusters/costs/estimate"
payload = {
"topology": "standalone",
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
},
"sentinel": {
"enabled": True,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
},
"sharding": {
"enabled": True,
"shardCount": 1,
"replicas": 1,
"resources": {
"limits": {
"cpu": "<string>",
"memory": "<string>"
},
"requests": {
"cpu": "<string>",
"memory": "<string>"
}
}
}
}
headers = {
"cookie": "token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
topology: 'standalone',
replicas: 1,
resources: {
limits: {cpu: '<string>', memory: '<string>'},
requests: {cpu: '<string>', memory: '<string>'}
},
sentinel: {
enabled: true,
replicas: 1,
resources: {
limits: {cpu: '<string>', memory: '<string>'},
requests: {cpu: '<string>', memory: '<string>'}
}
},
sharding: {
enabled: true,
shardCount: 1,
replicas: 1,
resources: {
limits: {cpu: '<string>', memory: '<string>'},
requests: {cpu: '<string>', memory: '<string>'}
}
}
})
};
fetch('http://localhost:3000/api/clusters/costs/estimate', 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/costs/estimate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'topology' => 'standalone',
'replicas' => 1,
'resources' => [
'limits' => [
'cpu' => '<string>',
'memory' => '<string>'
],
'requests' => [
'cpu' => '<string>',
'memory' => '<string>'
]
],
'sentinel' => [
'enabled' => true,
'replicas' => 1,
'resources' => [
'limits' => [
'cpu' => '<string>',
'memory' => '<string>'
],
'requests' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]
],
'sharding' => [
'enabled' => true,
'shardCount' => 1,
'replicas' => 1,
'resources' => [
'limits' => [
'cpu' => '<string>',
'memory' => '<string>'
],
'requests' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]
]
]),
CURLOPT_COOKIE => "token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/clusters/costs/estimate"
payload := strings.NewReader("{\n \"topology\": \"standalone\",\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n },\n \"sentinel\": {\n \"enabled\": true,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n },\n \"sharding\": {\n \"enabled\": true,\n \"shardCount\": 1,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "token=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/clusters/costs/estimate")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"topology\": \"standalone\",\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n },\n \"sentinel\": {\n \"enabled\": true,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n },\n \"sharding\": {\n \"enabled\": true,\n \"shardCount\": 1,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/clusters/costs/estimate")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"topology\": \"standalone\",\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n },\n \"sentinel\": {\n \"enabled\": true,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n },\n \"sharding\": {\n \"enabled\": true,\n \"shardCount\": 1,\n \"replicas\": 1,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n },\n \"requests\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"provider": "rate-card",
"configured": true,
"estimated": true,
"footprint": {
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"components": [
{
"component": "<string>",
"replicas": 1,
"cpuCores": 1,
"memoryGb": 1,
"storageGb": 1,
"storageClass": "<string>"
}
]
},
"warnings": [
"no-cpu-request"
],
"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>"
}Authorizations
JWT token stored in HTTP-only cookie
Body
application/json
Response
Default Response
Available options:
rate-card Available options:
true Show child attributes
Show child attributes
Available options:
no-cpu-request Show child attributes
Show child attributes
Was this page helpful?
⌘I