API Overview
Mist provides a comprehensive REST API for programmatic access to all features.
Base URL
https://your-mist-instance.com/apiAuthentication
All API requests require authentication using JWT tokens stored in HTTP-only cookies.
Via Browser
Cookies are set automatically after login.
Via cURL/API Client
- Login to get session cookie:
bash
curl -X POST https://mist.example.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password"}' \
-c cookies.txt- Use cookie in subsequent requests:
bash
curl https://mist.example.com/api/apps \
-b cookies.txtAPI Endpoints
Authentication
POST /api/auth/login- LoginPOST /api/auth/logout- LogoutGET /api/auth/me- Get current user
Projects
GET /api/projects- List projectsPOST /api/projects/create- Create projectGET /api/projects/:id- Get projectPUT /api/projects/update- Update projectDELETE /api/projects/delete- Delete project
Applications
POST /api/apps/get- List applicationsPOST /api/apps/create- Create applicationPOST /api/apps/update- Update applicationPOST /api/apps/delete- Delete application
Deployments
POST /api/deployments/create- Trigger deploymentPOST /api/deployments/get- List deploymentsGET /api/deployments/:id- Get deployment details
Environment Variables
POST /api/apps/envs/create- Create variablePOST /api/apps/envs/get- List variablesPUT /api/apps/envs/update- Update variableDELETE /api/apps/envs/delete- Delete variable
Domains
POST /api/apps/domains/create- Add domainPOST /api/apps/domains/get- List domainsDELETE /api/apps/domains/delete- Remove domain
Users (Admin Only)
POST /api/users/get- List usersPOST /api/users/create- Create userDELETE /api/users/delete- Delete user
GitHub Integration
POST /api/github/repos- List repositoriesPOST /api/github/branches- List branchesPOST /api/webhooks/github- Webhook endpoint
WebSocket Endpoints
Container Logs
ws://your-mist-instance.com/api/ws/logs/:containerIdSystem Metrics
ws://your-mist-instance.com/api/ws/metricsDeployment Status
ws://your-mist-instance.com/api/ws/deployment/:deploymentIdResponse Format
Success Response
json
{
"success": true,
"data": { ... }
}Error Response
json
{
"success": false,
"error": "Error message"
}Rate Limiting
Currently no rate limiting is enforced. This will be added in future releases.
API Versioning
The API is currently unversioned. Breaking changes will be avoided when possible.
Coming Soon
- API Tokens - Generate tokens for non-browser clients
- OpenAPI Specification - Interactive API documentation
- API Versioning - v1, v2, etc.
- Rate Limiting - Prevent API abuse
- Webhooks - Subscribe to events
- GraphQL API - Alternative to REST
