agents
Vesta API · 6.0.75 · Community
GET/api/v1/agentsList Agents
List all agents (protected)
Authentication
Responses
200
Successful Response
application/json
Schema
{
"items": {
"additionalProperties": false,
"properties": {
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hostname": {
"type": "string"
},
"id": {
"type": "string"
},
"ip_address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"last_heartbeat": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"metrics": {
"additionalProperties": true,
"description": "Extensible domain metadata; keys are not a closed schema.",
"type": "object"
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"status": {
"type": "string"
},
"version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"vm_count": {
"type": "integer"
}
},
"required": [
"id",
"hostname",
"display_name",
"status",
"ip_address",
"port",
"version",
"last_heartbeat",
"vm_count",
"metrics"
],
"type": "object"
},
"type": "array"
}POST/api/v1/agents/registerRegister Agent
Agent self-registration endpoint with secure key generation. Requires valid registration key from AgentRegistrationKey table. Validates key expiration, max uses, and enabled status.
Parameters
X-API-Key · header · Optional
{
"title": "X-Api-Key",
"type": "string"
}Request body
Required
application/json
Schema
{
"additionalProperties": true,
"title": "Agent Data",
"type": "object"
}Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json
Schema
DELETE/api/v1/agents/{agent_id}Delete Agent
Delete agent (admin only). Args: agent_id: Agent ID to delete cascade: If True, delete VMs only when they have no backup custody
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}cascade · query · Optional
{
"default": false,
"title": "Cascade",
"type": "boolean"
}Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json
Schema
GET/api/v1/agents/{agent_id}Get Agent Details
Get agent details by ID
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json
Schema
PATCH/api/v1/agents/{agent_id}Update Agent
Update agent settings (admin only)
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}Request body
Required
application/json
Schema
Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json
Schema
GET/api/v1/agents/{agent_id}/key-rotationsList Agent Key Rotations
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}Authentication
Responses
200
Successful Response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"items": {
"items": {
"additionalProperties": false,
"properties": {
"activated_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"agent_id": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"key_prefix": {
"type": "string"
},
"rotation_id": {
"type": "string"
},
"state": {
"enum": [
"pending",
"activated",
"cancelled",
"expired"
],
"type": "string"
}
},
"required": [
"rotation_id",
"agent_id",
"state",
"key_prefix",
"created_at",
"expires_at",
"activated_at"
],
"type": "object"
},
"type": "array"
},
"total": {
"type": "integer"
}
},
"required": [
"items",
"total"
],
"type": "object"
}401
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
403
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
404
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
409
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
410
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
422
Validation Error
application/json
Schema
500
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
DELETE/api/v1/agents/{agent_id}/key-rotations/{rotation_id}Cancel Agent Key Rotation
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}rotation_id · path · Required
{
"title": "Rotation Id",
"type": "string"
}Authentication
Responses
200
Successful Response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"activated_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"agent_id": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"key_prefix": {
"type": "string"
},
"rotation_id": {
"type": "string"
},
"state": {
"enum": [
"pending",
"activated",
"cancelled",
"expired"
],
"type": "string"
}
},
"required": [
"rotation_id",
"agent_id",
"state",
"key_prefix",
"created_at",
"expires_at",
"activated_at"
],
"type": "object"
}401
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
403
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
404
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
409
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
410
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
422
Validation Error
application/json
Schema
500
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
GET/api/v1/agents/{agent_id}/key-rotations/{rotation_id}Get Agent Key Rotation
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}rotation_id · path · Required
{
"title": "Rotation Id",
"type": "string"
}Authentication
Responses
200
Successful Response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"activated_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"agent_id": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"key_prefix": {
"type": "string"
},
"rotation_id": {
"type": "string"
},
"state": {
"enum": [
"pending",
"activated",
"cancelled",
"expired"
],
"type": "string"
}
},
"required": [
"rotation_id",
"agent_id",
"state",
"key_prefix",
"created_at",
"expires_at",
"activated_at"
],
"type": "object"
}401
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
403
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
404
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
409
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
410
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
422
Validation Error
application/json
Schema
500
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
POST/api/v1/agents/{agent_id}/key-rotations/{rotation_id}/activateActivate Agent Key
Candidate proof is limited to this exact rotation; no user Bearer substitute.
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}rotation_id · path · Required
{
"title": "Rotation Id",
"type": "string"
}X-Agent-Key · header · Optional
{
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "X-Agent-Key"
}Authentication
Responses
200
Successful Response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"activated_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"agent_id": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"key_prefix": {
"type": "string"
},
"rotation_id": {
"type": "string"
},
"state": {
"enum": [
"pending",
"activated",
"cancelled",
"expired"
],
"type": "string"
}
},
"required": [
"rotation_id",
"agent_id",
"state",
"key_prefix",
"created_at",
"expires_at",
"activated_at"
],
"type": "object"
}401
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
403
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
404
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
409
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
410
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
422
Validation Error
application/json
Schema
500
Candidate or current administrator authority, lifecycle state or validated input unavailable. A refused candidate does not replace the active key.
application/json
Schema
POST/api/v1/agents/{agent_id}/rotate-keyRotate Agent Key
Stage a one-time candidate; the current agent key remains active until proof.
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}Idempotency-Key · header · Optional
Caller-supplied UUID identifying this intent permanently. Reuse only for the same original principal, organization, action and normalized input. Not HTTP X-Request-ID.
{
"format": "uuid",
"type": "string"
}Authentication
Responses
200
Durable admission receipt; pending/queued is not proof of external execution or success. A replay returns the original nonsecret receipt.
Headers
{
"Cache-Control": {
"schema": {
"const": "no-store"
}
},
"Idempotency-Key": {
"schema": {
"format": "uuid",
"type": "string"
}
},
"Idempotency-Replayed": {
"schema": {
"enum": [
"true",
"false"
],
"type": "string"
}
},
"X-Request-ID": {
"description": "Per-HTTP-request correlation, separate from durable admission identity.",
"schema": {
"type": "string"
}
}
}application/json
Schema
{
"discriminator": {
"propertyName": "secret_delivery"
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"activated_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"agent_id": {
"type": "string"
},
"api_key": {
"description": "First response only. Permanently absent from replay and outcome lookup.",
"type": "string",
"writeOnly": true
},
"created_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"key_prefix": {
"type": "string"
},
"request_id": {
"format": "uuid",
"type": "string"
},
"rotation_id": {
"type": "string"
},
"secret_delivery": {
"const": "one_time",
"type": "string"
},
"state": {
"enum": [
"pending",
"activated",
"cancelled",
"expired"
],
"type": "string"
}
},
"required": [
"rotation_id",
"agent_id",
"state",
"key_prefix",
"created_at",
"expires_at",
"activated_at",
"request_id",
"secret_delivery",
"api_key"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"activated_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"agent_id": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"key_prefix": {
"type": "string"
},
"request_id": {
"format": "uuid",
"type": "string"
},
"rotation_id": {
"type": "string"
},
"secret_delivery": {
"const": "unavailable",
"type": "string"
},
"state": {
"enum": [
"pending",
"activated",
"cancelled",
"expired"
],
"type": "string"
}
},
"required": [
"rotation_id",
"agent_id",
"state",
"key_prefix",
"created_at",
"expires_at",
"activated_at",
"request_id",
"secret_delivery"
],
"type": "object"
}
]
}400
Invalid domain request.
application/json
Schema
401
Authentication unavailable.
application/json
Schema
403
Current action authority unavailable.
application/json
Schema
404
Authorized resource unavailable.
application/json
Schema
409
Identity conflict, unresolved/retired outcome, pending agent rotation, stale KEK predecessor or unsupported provider contract.
application/json
Schema
413
Normalized intent exceeds admission limit.
application/json
Schema
422
Malformed identity, request validation or bulk target limit.
application/json
Schema
423
Existing source or operation custody prevents admission.
application/json
Schema
500
Outcome may be unknown after a lost/failing commit response. Reconcile the same request identity.
application/json
Schema
text/plain
Schema
{
"type": "string"
}503
Admission dependency unavailable.
application/json
Schema
PATCH/api/v1/agents/{agent_id}/settingsUpdate Agent Settings
Update agent runtime settings (admin only). Settings are delivered to agent via heartbeat response and applied unless overridden by local agent.env configuration. Pre-condition: No active backups on agent (returns 409 if busy).
Parameters
agent_id · path · Required
{
"title": "Agent Id",
"type": "string"
}Request body
Required
application/json
Schema
Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json
Schema
POST/api/v1/agents/{hostname}/vmsSync Agent Vms
Sync VMs from agent - requires agent API key authentication.
Parameters
hostname · path · Required
{
"title": "Hostname",
"type": "string"
}X-Agent-Key · header · Optional
{
"title": "X-Agent-Key",
"type": "string"
}Request body
Required
application/json
Schema
{
"additionalProperties": true,
"title": "Vms Data",
"type": "object"
}Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json
Schema
GET/api/v1/vmsList Vms
List all VMs with pagination, filtering, and sorting (protected)
Parameters
skip · query · Optional
{
"default": 0,
"minimum": 0,
"title": "Skip",
"type": "integer"
}limit · query · Optional
Clamped to 100 per page
{
"default": 50,
"description": "Clamped to 100 per page",
"minimum": 1,
"title": "Limit",
"type": "integer"
}search · query · Optional
{
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Search"
}agent_id · query · Optional
{
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Agent Id"
}state · query · Optional
{
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "State"
}group_id · query · Optional
{
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Group Id"
}sort_by · query · Optional
{
"default": "name",
"title": "Sort By",
"type": "string"
}sort_order · query · Optional
{
"default": "asc",
"title": "Sort Order",
"type": "string"
}inventory_present · query · Optional
{
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Inventory Present"
}Authentication
Responses
200
Successful Response
application/json
Schema
{
"additionalProperties": false,
"properties": {
"has_more": {
"type": "boolean"
},
"items": {
"items": {
"additionalProperties": false,
"properties": {
"absent_since": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"agent_hostname": {
"type": "string"
},
"agent_id": {
"type": "string"
},
"backup_eligibility": {
"additionalProperties": false,
"properties": {
"eligible": {
"type": "boolean"
},
"has_raw": {
"type": "boolean"
},
"warnings": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"eligible",
"has_raw",
"warnings"
],
"type": "object"
},
"created_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"disks": {
"items": {
"additionalProperties": true,
"description": "Extensible domain metadata; keys are not a closed schema.",
"type": "object"
},
"type": "array"
},
"id": {
"type": "string"
},
"inventory_present": {
"type": "boolean"
},
"last_backup_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"last_backup_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"last_backup_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"last_observed_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"memory_kb": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"metadata": {
"additionalProperties": true,
"description": "Extensible domain metadata; keys are not a closed schema.",
"type": "object"
},
"name": {
"type": "string"
},
"namespace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"provider": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"replaces_vm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"vcpu_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"vm_uid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"vmi_uid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"uuid",
"state",
"provider",
"namespace",
"vm_uid",
"vmi_uid",
"replaces_vm_id",
"last_backup_type",
"last_backup_status",
"id",
"name",
"memory_kb",
"vcpu_count",
"disks",
"metadata",
"inventory_present",
"last_observed_at",
"absent_since",
"agent_id",
"agent_hostname",
"created_at",
"last_backup_at",
"backup_eligibility"
],
"type": "object"
},
"type": "array"
},
"limit": {
"type": "integer"
},
"skip": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"required": [
"items",
"total",
"skip",
"limit",
"has_more"
],
"type": "object"
}422
Validation Error
application/json
Schema
POST/api/v1/vms/ids-by-filterGet Vm Ids By Filter
Get VM IDs matching filter criteria (for 'select all matching' across pages).
Request body
Required
application/json
Schema
{
"additionalProperties": true,
"title": "Body",
"type": "object"
}Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json
Schema
GET/api/v1/vms/{vm_id}Get Vm
Get VM details (protected)
Parameters
vm_id · path · Required
{
"title": "Vm Id",
"type": "string"
}Authentication
Responses
200
Successful Response
application/json
Schema
{}422
Validation Error
application/json