Full API Reference
The complete sh0 REST API: more than 230 paths under /api/v1, an interactive explorer, and a downloadable OpenAPI specification for code generation.
Interactive API Explorer
The easiest way to explore the sh0 API is through the interactive API explorer, available at:
- Dashboard: open Services → API Docs in your sh0 dashboard.
- Website: Visit /api on the sh0 website.
The explorer lets you:
- Browse all endpoints organized by category
- View request parameters, headers, and body schemas
- See example responses for each endpoint
- Try endpoints directly from the browser (when connected to a sh0 instance)
- Copy curl commands for any endpoint
utoipa. It is always in sync with the actual API endpoints in your sh0 version.OpenAPI Specification
sh0 exposes a full OpenAPI 3.1 specification that describes every endpoint, parameter, request body, and response type. The spec is auto-generated from the Rust source code using utoipa, ensuring it is always accurate and up to date.
The spec is served in JSON, without authentication, at:
curl https://panel.example.com/api/v1/openapi.jsonEndpoint Groups
The API is organized into logical groups. Here is a summary of the major endpoint categories:
Apps
Manage application lifecycle -- create, configure, start, stop, restart, and delete apps.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/apps | List all applications |
| POST | /api/v1/apps | Create a new application |
| POST | /api/v1/apps/upload | Create or update an app from an uploaded archive |
| GET | /api/v1/apps/:id | Get app details |
| PATCH | /api/v1/apps/:id | Update app configuration |
| DELETE | /api/v1/apps/:id | Delete an application |
| POST | /api/v1/apps/:id/restart | Restart an application |
Deployments
Trigger deployments, view build logs, rollback, and manage deployment history.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/apps/:id/deployments | Trigger a new deployment |
| GET | /api/v1/apps/:id/deployments | List deployment history |
| POST | /api/v1/deployments/:id/rollback | Rollback to a previous deployment |
Domains & SSL
List domains, attach them to an app, and manage its certificates.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/domains | List all domains |
| POST | /api/v1/apps/:id/domains | Add a domain to an app |
| DELETE | /api/v1/apps/:id/domains/:domain_id | Remove a domain from an app |
| GET | /api/v1/apps/:id/certificates | List an app’s certificates |
Databases
Create database servers and run backups and restores.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/database-servers | Create a database server |
| GET | /api/v1/database-servers/:id | Get a database server |
| POST | /api/v1/backups/trigger | Trigger a backup now |
| POST | /api/v1/backups/:id/restore | Restore a backup |
Other Endpoints
The API also covers these resource categories:
| Category | Endpoints | Description |
|---|---|---|
| Environment Variables | 8 endpoints | CRUD for env vars, bulk import, secret management |
| Storage & Mounts | 6 endpoints | Volume management, storage providers |
| Scaling | 4 endpoints | Manual scaling, auto-scaling rules |
| Monitoring | 12 endpoints | Metrics, alerts, uptime checks, health status |
| Cron Jobs | 5 endpoints | Schedule, list, update, delete, run cron jobs |
| Team & Auth | 15 endpoints | Login, 2FA, sessions, team members, API keys |
| SSH Keys | 4 endpoints | Add, list, delete SSH keys |
| Nodes | 8 endpoints | Multi-server management, node health |
| Services | 8 endpoints | Sub-service URLs, status, restart, stop, start, credentials |
| Backups | 11 endpoints | Trigger, list, restore, download backups, manage schedules |
| Certificates | 6 endpoints | SSL certificate management, CSR generation, SSL modes |
| Projects | 11 endpoints | Project CRUD, member management, audit logs |
| Redirects | 5 endpoints | URL redirect rules, create, update, toggle, delete |
| Preview Environments | 4 endpoints | PR preview deployments, settings, cleanup |
| Settings | 6 endpoints | Server configuration, domain, Cloudflare, ACME, DNS |
| Templates | 5 endpoints | Browse and deploy from 171 templates |
| Webhooks | 6 endpoints | Git webhooks, deploy hooks, notification hooks |
Downloading the OpenAPI Spec
You can download the OpenAPI specification to use with documentation tools, testing frameworks, or code generators.
curl -o sh0-openapi.json https://panel.example.com/api/v1/openapi.jsonThe spec file can be imported into tools like:
- Postman: Import the spec to create a collection with all endpoints pre-configured.
- Insomnia: Import for an interactive API workspace.
- Swagger UI: Host your own interactive API docs.
- Redocly: Generate beautiful API documentation.
Using with Code Generators
The OpenAPI spec can be used with code generators to create typed API clients in any language:
TypeScript client (using openapi-typescript):
npx openapi-typescript https://panel.example.com/api/v1/openapi.json \
-o ./src/lib/api/sh0-types.ts