API Guides
Copy-pasteable patterns for the jobs integrations do most. Adapt the host, key, and IDs. Full field details live in the API reference.
Provision a server for a new customer
Section titled “Provision a server for a new customer”BASE=https://panel.example.comAUTH="Authorization: Bearer $CATALYST_API_KEY"
# 1. Pick a template and nodecurl -H "$AUTH" "$BASE/api/templates?search=paper" | head -c 600curl -H "$AUTH" "$BASE/api/nodes" | head -c 600
# 2. Create the server (see reference for the full body — field names below# match the real create schema: allocation comes from primaryPort/primaryIp# or an explicit allocationId)curl -X POST -H "$AUTH" -H 'Content-Type: application/json' \ -d '{"name":"customer-1","templateId":"<id>","nodeId":"<id>","locationId":"<id>","allocatedMemoryMb":2048,"allocatedCpuCores":2,"allocatedDiskMb":10240,"primaryPort":25565,"environment":{}}' \ "$BASE/api/servers"
# 3. Start it and follow the console via WebSocketcurl -X POST -H "$AUTH" "$BASE/api/servers/<serverId>/power" \ -H 'Content-Type: application/json' -d '{"action":"start"}'Nightly backup check
Section titled “Nightly backup check”# List recent backups; alert if the newest successful one is too old.curl -H "$AUTH" "$BASE/api/servers/<serverId>/backups?limit=5"Rotate a leaked API key
Section titled “Rotate a leaked API key”# Create the replacement first, deploy it, then delete the old key —# never delete-then-create (that is an outage).curl -X POST -H "$AUTH" -H 'Content-Type: application/json' \ -d '{"name":"billing-sync-v2","permissions":[...]}' \ "$BASE/api/admin/api-keys"curl -X DELETE -H "$AUTH" "$BASE/api/admin/api-keys/<oldId>"React to crashes in realtime
Section titled “React to crashes in realtime”Subscribe to server events (WebSockets), trigger on the offline/crash event, then confirm via REST before paging anyone — flapping nodes produce duplicate events during reconnects.
