Step 1/5
Pick a plan
List the plans you can order, filtered by country_code or datacenter_id. Add lang=en for English names.
From the plan you choose, keep its id, the id of one of its templates (the operating system) and the ids of any features you want.
curl -G "https://api.nexnode.cloud/api/v1/catalog/servers" \
-d country_code=DE \
-d lang=en \
-H "X-API-Token: $NEXNODE_TOKEN"
import os
import requests
BASE = "https://api.nexnode.cloud/api/v1"
api = requests.Session()
api.headers["X-API-Token"] = os.environ["NEXNODE_TOKEN"]
params = {"country_code": "DE", "lang": "en"}
response = api.get(f"{BASE}/catalog/servers", params=params)
plan = response.json()["data"][0]
<?php
const BASE = 'https://api.nexnode.cloud/api/v1';
function nexnode(
string $method,
string $path,
?array $body = null,
array $headers = [],
): array {
$options = [
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_RETURNTRANSFER => true,
];
$headers[] = 'X-API-Token: ' . getenv('NEXNODE_TOKEN');
if ($body !== null) {
$headers[] = 'Content-Type: application/json';
$options[CURLOPT_POSTFIELDS] = json_encode($body);
}
$options[CURLOPT_HTTPHEADER] = $headers;
$ch = curl_init(BASE . $path);
curl_setopt_array($ch, $options);
return json_decode(curl_exec($ch), true);
}
$query = http_build_query(['country_code' => 'DE', 'lang' => 'en']);
$plan = nexnode('GET', "/catalog/servers?$query")['data'][0];
{
"success": true,
"data": [
{
"id": 42,
"name": "CX22",
"cpu": 2,
"memory": 4,
"disk": 40,
"location": {"id": 3, "name": "Falkenstein"},
"prices": [
{"term": "hourly", "price": 0.0097, "currency": "USD"}
],
"templates": [
{"id": 7, "name": "Ubuntu 24.04", "os_type": "linux"}
],
"features": [
{"id": 12, "name": "Backups", "price": 0.0015}
]
}
]
}