Introduction
The StellarStack API is a RESTful API built with Hono that provides programmatic access to manage your game servers, nodes, blueprints, and more. The API supports JSON request and response formats.Base URL
The API is available at:API_URL environment variable.
Versioning
The current API uses path-based versioning with all endpoints prefixed with/api. Future versions may introduce version-specific paths like /api/v2 if breaking changes are required.
Response Format
All API responses are returned in JSON format with appropriate HTTP status codes.Success Response
Successful requests return a200 OK status code (or 201 Created for resource creation) with the requested data:
Error Response
Error responses include anerror field with a descriptive message:
Common Status Codes
Request successful
Resource created successfully
Invalid request parameters or body
Authentication required or invalid credentials
Insufficient permissions to access resource
Resource not found
Rate limit exceeded
Server error occurred
Rate Limit Headers
All API responses include rate limit information in the headers:Maximum number of requests allowed in the current window
Number of requests remaining in the current window
Unix timestamp when the rate limit window resets
CORS
The API supports Cross-Origin Resource Sharing (CORS) for requests from the configured frontend URL. In desktop mode, requests from anylocalhost origin are allowed.
Allowed origins are configured via the FRONTEND_URL environment variable.
Health Check
You can check the API health status using the health endpoint:Request Format
All POST and PUT requests should include aContent-Type: application/json header and a JSON request body.