API

For servers on a paid plan

Run your server from your own tools: a dashboard for your community, a Discord bot that starts the server, a script that backs up your configs. With an API key you can read the server's status, stats, console and players, start and stop it, send commands, and work with its files.

Get a key

  • In the panel, open the server's Settings, then API keys under Access, name the key and make it. The owner can do this; co-owners can't.
  • The key is shown once. Copy it then; if you lose it, delete it and make another.
  • A key works on its one server, as you, for the things listed below; a server can have 5. It works while the server is on a paid plan, and rests (answering plan_required) if it goes back to Free.
  • Keep it secret, like a password: anyone with it can start, stop and change the server. Use it from your own server or bot, never in a web page's code. Everything a key does shows in the server's activity, with the key's name. Delete a key in Settings and it stops working at once.

Make a request

Send the key in the Authorization header. Every address below starts with https://jumphosting.cloud/api/v1/servers/<name>, where <name> is the server's name (the first part of its address). Bodies are JSON unless it says otherwise.

# Is it up, and who's on?
curl -H "Authorization: Bearer $JUMP_KEY" \
  https://jumphosting.cloud/api/v1/servers/survival-smp

# Start it
curl -X POST -H "Authorization: Bearer $JUMP_KEY" \
  -H "Content-Type: application/json" -d '{"action":"start"}' \
  https://jumphosting.cloud/api/v1/servers/survival-smp/power

# Upload a plugin
curl -X POST -H "Authorization: Bearer $JUMP_KEY" \
  -F files=@MyPlugin.jar \
  "https://jumphosting.cloud/api/v1/servers/survival-smp/files/upload?path=plugins"

Or from JavaScript (Node.js 18 or later, or a Discord bot):

const res = await fetch("https://jumphosting.cloud/api/v1/servers/survival-smp/stats", {
  headers: { Authorization: `Bearer ${process.env.JUMP_KEY}` },
});
const stats = await res.json();
console.log(stats.state, stats.playersOnline, stats.cpuPercent);

What a key can do

RequestWhat it does
GET /The server: state, address, plan, version, playersOnline, memoryMb, maxPlayers and more.
GET /statsLive use: cpuPercent (100 = one core), memoryUsedMb, diskUsedMb, uptimeSeconds, playersOnline, tps when known, and their limits.
GET /console?lines=100Recent console lines, oldest first (up to 500): {"lines":[{"t","k","text"}]}.
GET /eventsA live stream (Server-Sent Events): state on every change, log for console output, stats every few seconds while it runs.
GET /playersWho's online, and the whitelist, operator and ban lists.
GET /crashesCrashes in the last day, newest first, with why and the log's last lines.
POST /power{"action":"start"}, or stop, restart, kill. Answers 202; follow state to see it happen.
POST /commandRun a console command: {"command":"say Restarting in 5 minutes"}. The server must be online.
GET /files?path=pluginsA folder's entries (name, dir, sizeBytes, modifiedAt), folders first. No path is the server's top folder.
GET /files/content?path=server.propertiesA text file, up to 1 MB.
PUT /files/content?path=server.propertiesCreate or replace a text file (up to 1 MB), sent as Content-Type: text/plain.
GET /files/download?path=worldDownload a file, or a folder as a .zip.
POST /files/upload?path=pluginsUpload files: multipart/form-data, each in a field named files, up to 100 MB in all.
POST /files/folder{"path":"plugins","name":"MyPlugin"}
POST /files/delete{"path":"logs","names":["old.log.gz"]}
POST /files/move{"path":"","names":["a.yml"],"to":"config"}
POST /files/rename{"path":"","name":"a.yml","to":"b.yml"}
POST /files/unzipUnpack a .zip, .tar, .tar.gz or .tgz where it is: {"path":"","name":"world.zip"}

A server's state is one of offline, starting, online, stopping, installing, moving, queued or suspended. Keys can't change plans or billing, co-owners, settings, backups or plugins, or delete the server; do those in the panel.

Limits and errors

  • Each key can make 60 requests in a burst, then 4 a second. Past that the answer is 429, with a Retry-After header in seconds. For live updates, keep /events open instead of asking for /stats over and over.
  • Errors are JSON, {"error":"…","message":"…"}: the code is for your program, the message for people.
StatuserrorMeans
401unauthenticatedNo key, a mistyped one, or one that was deleted.
403plan_requiredThe server is on Free; the key works again when it's upgraded.
403forbiddenSomething keys can't do (see above).
404not_foundAnother server's name (a key works on its own server only), or a file that isn't there.
409wrong_state, busyNot now: for example a command while the server is offline, or a change while another runs.
429rate_limitedToo many requests; wait as long as Retry-After says.

Questions

Something missing you'd use? Tell us at support@jumphosting.cloud. See the guide for the panel itself.