List a cloud's plans
/v1/clouds/{cloud}/plans Lists the plans (server sizes) you can choose on a cloud, with their price a month in US cents. Disk and data transfer are this cloud's.
Some plans are offered in some regions only (regions). Pass region to list only the plans offered there; a region the cloud doesn't have gives an empty list. A plan that's sold out for now is still listed: GET /v1/clouds/{cloud}/availability says what's in stock.
Plans the cloud no longer sells aren't listed (servers already on one keep it). For custom, the one plan listed is the Own servers plan: one price a month for all the servers you connect. A cloud that isn't open to your account, or that doesn't exist, answers 404 not_found.
Scopes
Any valid token can make this request.
Path parameters
| Field | Type and description |
|---|---|
cloud Required | string A cloud's id, as One of: |
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: |
region | string 1 to 64 characters Only the plans offered in this region: a region's |
Example request
curl "https://api.rabbitflare.com/v1/clouds/digitalocean/plans?region=fra1" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/clouds/digitalocean/plans?region=fra1", {
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.plans.list({ cloud: "digitalocean", region: "fra1" })) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/clouds/digitalocean/plans?region=fra1');
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/digitalocean/plans",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"region": "fra1",
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of Plan objects in data, with a Pagination object in pagination.
The Plan object's fields 15 fields
| Field | Type and description |
|---|---|
id | string The plan's id. Pass it as |
name | string The plan's name, as the panel shows it. |
description | string What the plan suits, or what its type of server is, in a sentence. |
cloud | string The cloud these values are for: a plan offered on two clouds can have more disk or data transfer on one. Known values: |
line | string or null The type of server, as the panel's headings show it (for example General Purpose). Null for the Own servers plan. |
option | string or null The choice within the type, where there is one (for example Premium Intel); otherwise null. |
architecture | string or null The kind of processor: Known values: |
vcpus | number Virtual CPUs. 0 for the Own servers plan: each of your servers has its own. |
memoryGb | number Memory, in GB. 0 for the Own servers plan. |
diskGb | number Disk, in GB, on this cloud. 0 for the Own servers plan. |
transferTb | number Data transfer included each month, in TB, on this cloud. 0 for the Own servers plan. |
priceMonthlyCents | integer The price a month for a new server, in US cents, before any offer (during a sale the first invoices can be lower). For the Own servers plan, one price covers all of the account's own servers. |
currency | string Always Always |
regions | array of strings or null The only regions the plan is offered in, or null when it's offered in every region of the cloud. |
popular | boolean Whether the panel suggests it as a popular choice. |
Example response
{
"data": [
{
"id": "starter",
"name": "Starter",
"description": "Personal sites, portfolios and small blogs.",
"cloud": "digitalocean",
"line": "Basic",
"option": "Regular",
"architecture": "x86_64",
"vcpus": 1,
"memoryGb": 1,
"diskGb": 25,
"transferTb": 1,
"priceMonthlyCents": 1200,
"currency": "usd",
"regions": null,
"popular": false
},
{
"id": "standard",
"name": "Standard",
"description": "Business sites and content-heavy blogs.",
"cloud": "digitalocean",
"line": "Basic",
"option": "Regular",
"architecture": "x86_64",
"vcpus": 1,
"memoryGb": 2,
"diskGb": 50,
"transferTb": 2,
"priceMonthlyCents": 2600,
"currency": "usd",
"regions": null,
"popular": true
},
{
"id": "business",
"name": "Business",
"description": "WooCommerce stores and membership sites.",
"cloud": "digitalocean",
"line": "Basic",
"option": "Regular",
"architecture": "x86_64",
"vcpus": 2,
"memoryGb": 4,
"diskGb": 80,
"transferTb": 4,
"priceMonthlyCents": 5200,
"currency": "usd",
"regions": null,
"popular": false
}
],
"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 |
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |