API Reference
RESTful API for programmatic access to Cmdop.
Base URL
https://api.cmdop.com/v1Authentication
All requests require authentication via API token:
curl https://api.cmdop.com/v1/machines \
-H "Authorization: Bearer YOUR_API_TOKEN"Get your API token from dashboard settings .
Response Format
All responses are JSON:
{
"data": { ... },
"meta": {
"request_id": "req_abc123"
}
}Error Responses
{
"error": {
"code": "not_found",
"message": "Machine not found",
"details": {}
}
}HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limited |
| 500 | Server Error |
Rate Limiting
- 1000 requests per minute per API token
- Rate limit headers included in responses:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
Pagination
List endpoints support pagination:
curl "https://api.cmdop.com/v1/machines?limit=10&offset=0"Response includes pagination metadata:
{
"data": [...],
"meta": {
"total": 45,
"limit": 10,
"offset": 0
}
}Endpoints
| Endpoint | Description |
|---|---|
GET /machines | List machines |
GET /machines/:id | Get machine |
POST /commands | Execute command |
GET /files | List files |
POST /schedules | Create schedule |
SDKs
We recommend using official SDKs: