REST API reference
API v1 examples for authentication, server creation, power actions, reinstallation and console connections.
#Authentication
The API runs at /api/v1 on your own VMRobot panel. In the panel, create a key under Settings → API keys. The key works with its owner’s role permissions; store it on the server side only.
Replace the panel address in the examples and the placeholders in <...> form with your real values. As a first check, use the auth/me request, which does not change any data.
curl --fail-with-body \
"https://panel.firmaniz.com/api/v1/auth/me" \
-H "Authorization: Bearer <API_ANAHTARINIZ>" \
-H "Accept: application/json"Successful responses use the {"data": ...} structure, and errors use {"error": {"code": "..."}}. Full field descriptions and the OpenAPI file are in the panel under Settings → API documentation.
#Get connection and template IDs
| Request | Purpose |
|---|---|
GET /api/v1/connections | Proxmox connections the user can access. |
GET /api/v1/connections/{connection}/templates | Templates of the selected connection. |
GET /api/v1/machines | Accessible virtual servers. |
GET /api/v1/machines/{machine} | Current status of a single server. |
#Create a server
POST /api/v1/machines creates a server from a registered template. The JSON below is an example; take the connection/template IDs from the listing response. This request allocates resources; try it only on infrastructure you have set aside for testing.
{
"connection_id": "<BAGLANTI_UUID>",
"template_id": "<SABLON_UUID>",
"name": "test-sunucu",
"cores": 2,
"memory_mb": 4096,
"disk_gb": 50,
"ssh_keys": "<SSH_PUBLIC_KEY>"
}| Field | Description |
|---|---|
connection_id, template_id | Required connection and template UUIDs. |
name | Required server name; use the schema in the panel for the valid format. |
cores, memory_mb, disk_gb | Required vCPU count, memory in MB and disk in GB. |
ip_pool_address_id | Optional selection of a specific IP; if omitted, one is assigned automatically from a suitable pool. |
resource_pool_id, node | Optional resource pool/node selection. |
ci_password, ssh_keys | Optional first-boot password and SSH public keys. |
Provisioning continues in the background. Use the returned server ID to check the status at the details endpoint. After an error, check whether the server has already been created before blindly repeating the same create request.
#Power actions
The POST /api/v1/machines/{machine}/power/{action} endpoint accepts the following action values.
| Action | Result |
|---|---|
start | Starts the server. |
shutdown | Sends a graceful shutdown signal to the operating system. |
stop | Cuts power immediately; may cause data loss. |
reboot | Initiates a reboot. |
#Reinstallation
{
"confirm": true,
"template_id": "<SABLON_UUID>"
}Confirmation via confirm is required. Check the supported optional fields and password rules in the API schema in the panel.
#Console connection
POST /api/v1/machines/{machine}/console generates a short-lived, single-use console connection. In the client_ip field, send the real IP address of the customer who will open the console; if the field is missing, the IP of the API caller is used.
{
"client_ip": "203.0.113.25"
}Open the data.url address from the response immediately; read its validity period from the data.expires_in value. Generate the connection when the customer presses the console button; do not create it in advance and store it. The URL contains access credentials, so do not add it to logs or support messages.
#Error codes and operation tracking
| HTTP | First check |
|---|---|
401 | Missing/invalid API key. |
403 | User role or object access permission. |
404 | Record ID and the user’s access to the record. |
422 | Submitted fields and the error.code detail. |
429 | Rate limit; if a Retry-After header is present, wait as it specifies. |
Technical details: logging and retries
Review the error code, the time of the operation and the related record ID together. Remove the Authorization header and the console URL from logs. Treat listing/status requests differently from requests that create resources; when resource creation appears to have failed, check for an existing record to avoid a duplicate server.