API Reference

What is the SharkCluster API?

The SharkCluster API lets you drive the platform programmatically — the same servers, applications, databases and registries you manage in the panel, reachable from your own tooling.

Base URL

https://api.sharkcluster.com

Authentication

The SharkCluster API authenticates requests with a Bearer token in the Authorization header (Authorization: Bearer <token>). You get the token yourself from the login endpoint, documented in the Authentication section. The token carries your account's full access, so treat it like your password: keep it out of source control and client-side code, and never share it.

Getting started

  1. 1Create an accountSign up at sharkcluster.com and provision at least one server, so there is something for the API to act on.
  2. 2Get a tokenCall the login endpoint (POST /login) with your account email and password, plus your two-factor code if 2FA is on. Send the token from the response on every request as Authorization: Bearer <token>.
  3. 3Make your first requestPick a read-only endpoint from the reference in the sidebar and confirm you get a 200 back before writing anything.

What are the core concepts of the SharkCluster API?

The SharkCluster API works with 4 kinds of resource: servers, applications, managed databases, container registries.

Servers
A VPS on one of the connected cloud providers, or on SharkCluster’s own infrastructure. Everything else hangs off a server.
Applications
A deployed app on a server, with its own domains, database, services, cronjobs and backups.
Managed databases
Database clusters managed separately from any one server, with parameter groups and their own backup schedule.
Container registries
Private image registries with repositories, tags, robot accounts and storage quotas.

How do SharkCluster API responses and errors work?

Read the body, not only the status code
Many endpoints report a failure with HTTP 200 and a body such as { "result": false, "message": "..." } explaining what went wrong. Treat a request as successful only when the body says so: result: true (or success: true on the endpoints that use it).
Response shapes vary by endpoint
Many endpoints wrap their data as { "result": true, "message": "...", "data": ... }; others return { "success": true, ... } or the data object directly. The sample response on each endpoint page shows the exact shape.
Missing or invalid token
Endpoints that need authentication answer 401 with { "result": false, "message": "Unauthorized: No token provided" } when the Authorization header is missing, and "Forbidden: Invalid token" when the token cannot be verified. Log in again to get a new token.
Lists are paginated
List endpoints such as Get Server List take page and limit query parameters (Get Server List defaults to page 1, 10 per page). Each endpoint page lists the parameters it accepts.

What does the SharkCluster API reference cover?

The SharkCluster API reference documents 47 endpoints in 6 sections: Authentication, User Management, Server Management, Technologies, Infrastructure, SSH Keys. Each endpoint page lists its parameters, a sample request and the success and failure responses.