Get CPU Availability
curl --request POST \
--url https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability \
--header 'Content-Type: application/json' \
--header 'Salad-Api-Key: <api-key>' \
--data '
{
"country_codes": [
"us",
"ca"
],
"cpu": 4,
"memory": 8192,
"storage_amount": 1000000000
}
'import requests
url = "https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability"
payload = {
"country_codes": ["us", "ca"],
"cpu": 4,
"memory": 8192,
"storage_amount": 1000000000
}
headers = {
"Salad-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Salad-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({country_codes: ['us', 'ca'], cpu: 4, memory: 8192, storage_amount: 1000000000})
};
fetch('https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability', 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://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability",
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([
'country_codes' => [
'us',
'ca'
],
'cpu' => 4,
'memory' => 8192,
'storage_amount' => 1000000000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Salad-Api-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability"
payload := strings.NewReader("{\n \"country_codes\": [\n \"us\",\n \"ca\"\n ],\n \"cpu\": 4,\n \"memory\": 8192,\n \"storage_amount\": 1000000000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Salad-Api-Key", "<api-key>")
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("https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability")
.header("Salad-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country_codes\": [\n \"us\",\n \"ca\"\n ],\n \"cpu\": 4,\n \"memory\": 8192,\n \"storage_amount\": 1000000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Salad-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_codes\": [\n \"us\",\n \"ca\"\n ],\n \"cpu\": 4,\n \"memory\": 8192,\n \"storage_amount\": 1000000000\n}"
response = http.request(request)
puts response.read_body{
"available_cpu_batch": 1234,
"on_call_cpu": 10245
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}Organizations
Get CPU Availability
Gets the CPU availability for the given organization
POST
/
organizations
/
{organization_name}
/
availability
/
sce-cpu-availability
Get CPU Availability
curl --request POST \
--url https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability \
--header 'Content-Type: application/json' \
--header 'Salad-Api-Key: <api-key>' \
--data '
{
"country_codes": [
"us",
"ca"
],
"cpu": 4,
"memory": 8192,
"storage_amount": 1000000000
}
'import requests
url = "https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability"
payload = {
"country_codes": ["us", "ca"],
"cpu": 4,
"memory": 8192,
"storage_amount": 1000000000
}
headers = {
"Salad-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Salad-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({country_codes: ['us', 'ca'], cpu: 4, memory: 8192, storage_amount: 1000000000})
};
fetch('https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability', 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://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability",
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([
'country_codes' => [
'us',
'ca'
],
'cpu' => 4,
'memory' => 8192,
'storage_amount' => 1000000000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Salad-Api-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability"
payload := strings.NewReader("{\n \"country_codes\": [\n \"us\",\n \"ca\"\n ],\n \"cpu\": 4,\n \"memory\": 8192,\n \"storage_amount\": 1000000000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Salad-Api-Key", "<api-key>")
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("https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability")
.header("Salad-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country_codes\": [\n \"us\",\n \"ca\"\n ],\n \"cpu\": 4,\n \"memory\": 8192,\n \"storage_amount\": 1000000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salad.com/api/public/organizations/{organization_name}/availability/sce-cpu-availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Salad-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_codes\": [\n \"us\",\n \"ca\"\n ],\n \"cpu\": 4,\n \"memory\": 8192,\n \"storage_amount\": 1000000000\n}"
response = http.request(request)
puts response.read_body{
"available_cpu_batch": 1234,
"on_call_cpu": 10245
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}Last Updated: October 19, 2025
Authorizations
Path Parameters
Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. The organization name.
Required string length:
2 - 63Pattern:
^[a-z][a-z0-9-]{0,61}[a-z0-9]$Example:
"acme-corp"
Body
application/json
Represents a request to check CPU availability
A list of country codes where the resources are available
ISO 3166-1 alpha-2 country code
Available options:
af, al, dz, as, ad, ao, ai, aq, ag, ar, am, aw, au, at, az, bs, bh, bd, bb, by, be, bz, bj, bm, bt, bo, bq, ba, bw, bv, br, io, bn, bg, bf, bi, cv, kh, cm, ca, ky, cf, td, cl, cn, cx, cc, co, km, cd, cg, ck, cr, hr, cu, cw, cy, cz, ci, dk, dj, dm, do, ec, eg, sv, gq, er, ee, sz, et, fk, fo, fj, fi, fr, gf, pf, tf, ga, gm, ge, de, gh, gi, gr, gl, gd, gp, gu, gt, gg, gn, gw, gy, ht, hm, va, hn, hk, hu, is, in, id, ir, iq, ie, im, il, it, jm, jp, je, jo, kz, ke, ki, kp, kr, kw, kg, la, lv, lb, ls, lr, ly, li, lt, lu, mo, mg, mw, my, mv, ml, mt, mh, mq, mr, mu, yt, mx, fm, md, mc, mn, me, ms, ma, mz, mm, na, nr, np, nl, nc, nz, ni, ne, ng, nu, nf, mp, no, om, pk, pw, ps, pa, pg, py, pe, ph, pn, pl, pt, pr, qa, mk, ro, ru, rw, re, bl, sh, kn, lc, mf, pm, vc, ws, sm, st, sa, sn, rs, sc, sl, sg, sx, sk, si, sb, so, za, gs, ss, es, lk, sd, sr, sj, se, ch, sy, tw, tj, tz, th, tl, tg, tk, to, tt, tn, tr, tm, tc, tv, ug, ua, ae, gb, um, us, uy, uz, vu, ve, vn, vg, vi, wf, eh, ye, zm, zw, ax Example:
["us", "ca"]
The number of available CPU cores
Example:
4
The amount of available memory in MB
Example:
8192
The amount of available storage in bytes
Example:
1000000000
Was this page helpful?