List clouds
/v1/clouds Lists the clouds you can create servers on, and custom for servers you already have at any provider, which you connect with one command.
Use a cloud's id to list its regions and plans, to check what's in stock, and as cloud when you create a server. A cloud that isn't open to your account isn't listed. GET /v1/account gives the same ids in the order the panel shows them.
Scopes
Any valid token can make this request.
Query parameters
| Field | Type and description |
|---|---|
limit | integer 1 to 100 Default How many items to return, from 1 to 100. Default 25. |
cursor | string 1 to 1,024 characters The |
sort | string Default The field to sort by. Each list names the fields it can be sorted by. One of: |
order | string Default
One of: |
Example request
curl "https://api.rabbitflare.com/v1/clouds" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/clouds", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data, pagination } = await res.json();
console.log(data, pagination.nextCursor); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
for await (const item of rf.catalog.clouds.list()) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/clouds');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
$answer = json_decode($body, true);
print_r($answer['data']);
echo $answer['pagination']['nextCursor'] ?? 'Last page', PHP_EOL; import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/clouds",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of Cloud objects in data, with a Pagination object in pagination.
The Cloud object's fields 5 fields
| Field | Type and description |
|---|---|
id | string The cloud's id. Use it to list its regions and plans, and to create a server. Known values: |
name | string The cloud's name, as the panel shows it. |
storage | string The kind of disk its servers have, as the panel shows it next to the disk size (for example SSD or NVMe SSD). |
metered | boolean Whether data transfer beyond what the plan includes is billed by use, to your card. |
ownServer | boolean Whether this is |
Example response
{
"data": [
{
"id": "digitalocean",
"name": "DigitalOcean",
"storage": "SSD",
"metered": false,
"ownServer": false
},
{
"id": "vultr",
"name": "Vultr",
"storage": "NVMe SSD",
"metered": false,
"ownServer": false
},
{
"id": "custom",
"name": "Your own server",
"storage": "disk",
"metered": false,
"ownServer": true
}
],
"pagination": {
"limit": 25,
"hasMore": false,
"nextCursor": null
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
400 invalid_ | The cursor isn't one this list gave, or was made with other filters or another sort. Start again from the first page, or keep the filters and sort the cursor was made with. |
400 invalid_ | A query parameter is unknown or has a wrong value ( Correct or remove the parameter named in |