Hosts
- POST /infrastructure/hosts/add
Add a new host
Add a new host to the infrastructure
- Status Codes:
201 Created – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- GET /infrastructure/hosts/console
Get local ttyd status
Ensures the local ttyd service is running and returns its URL and status.
- Status Codes:
200 OK – url, status, message, console
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/cs-mgmt-key/resync
Resync CloudStack management SSH key (maintenance window)
Regenerates the CS management PKCS#1 key + DB rows, restarts cloudstack-management, waits for functional readiness and agent reconnect, and force-restarts stuck agents. Multi-minute, cluster-disruptive.
- Status Codes:
200 OK – Resync report
409 Conflict – Not the management node
500 Internal Server Error – Resync failed
- Response JSON Object:
cs_ready (boolean)
final_states (object)
hosts_force_restarted[] (string)
hosts_initially_down[] (string)
key_regenerated (boolean)
mgmt_restarted (boolean)
ok (boolean)
reconnect_timeout_seconds (integer)
- POST /infrastructure/hosts/dedicate
Dedicate a host
Dedicate a host to a specific CloudStack domain and optionally an account.
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/dedicate/list
List dedicated hosts
Get a list of hosts that have been dedicated to a domain or account
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/dedicate/release
Release a dedicated host
Release the dedicated assignment of a host so it can be used by any tenant
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- DELETE /infrastructure/hosts/delete
Delete a host
Delete a host from the infrastructure
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- GET /infrastructure/hosts/details
Get Host Additional Details
Retrieves unified hardware details for a host by resolving the hostname to its BMC IP and vendor,
- Query Parameters:
hostname (string) – OS hostname of the host (e.g. as-1115cs-tnr-74966A)
- Status Codes:
200 OK – OK
400 Bad Request – Missing hostname parameter
404 Not Found – Host not found in database
500 Internal Server Error – Unsupported vendor or inventory collection error
- Response JSON Object:
bios_version (string)
bmc_address (string)
bmc_version (string)
fqdn (string)
health (string)
hostname (string)
manufacturer (string)
memory.total_gib (integer)
model (string)
os_ip (string)
power_state (string)
processors.cores (integer)
processors.count (integer)
processors.model (string)
processors.threads (integer)
serial (string)
uuid (string)
vendor (string)
- POST /infrastructure/hosts/disable
DisableHost
Disable a host from operations
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/enable
EnableHost
Enable a host for operations
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
408 Request Timeout – Host HA enable operation timed out
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/getbyid
Get host by ID
Retrieve host details by unique host identifier
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
404 Not Found – Host not found
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/lend
Lend a host to tenants
Marks a host as lent to a list of tenants so they can share it, rather than
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
404 Not Found – Host not found
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/lend/release
Un-lend a host
Releases a host’s lent state: sets is_lent to false and clears lent_to_tenant_ids
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
404 Not Found – Host not found
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/list
List hosts
Get a list of all hosts with optional filters
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/metrics
ListHostsMetrics
Get metrics for all hosts
- Status Codes:
200 OK – Success response
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- POST /infrastructure/hosts/metrics/aggregate
Aggregate host metrics
Returns aggregated CPU, memory, disk and network metrics across all hosts
- Status Codes:
200 OK – Aggregated host metrics
400 Bad Request – Invalid request payload
500 Internal Server Error – Internal server error
- Response JSON Object:
generated_at (string)
host_count (integer)
hostname (string)
hostnames[] (string)
percentages.cpu_allocated (number)
percentages.cpu_used (number)
percentages.disk_allocated (number)
percentages.memory_allocated (number)
percentages.memory_used (number)
totals.cpu_allocated_ghz (number)
totals.cpu_total_ghz (number)
totals.cpu_used_ghz (number)
totals.disk_size_allocated (integer)
totals.disk_size_total (integer)
totals.memory_allocated_bytes (integer)
totals.memory_total (integer)
totals.memory_used (integer)
totals.network_kbs_read (integer)
totals.network_kbs_total (integer)
totals.network_kbs_write (integer)
unsupported[] (string)
- GET /infrastructure/hosts/metrics/chart
Get host metrics chart
Returns time-series host metrics from InfluxDB for charting. When hostname is provided, returns metrics for that host only; otherwise returns fleet aggregate metrics.
- Query Parameters:
granularity (string) – Time granularity: hour, day, week, month
hostname (string) – Optional host name for an individual host chart
from (string) – Start time in RFC3339 format
to (string) – End time in RFC3339 format
- Status Codes:
200 OK – Host metrics chart data
400 Bad Request – Invalid time range
500 Internal Server Error – Internal server error
- Response JSON Object:
data_points[].cpu_allocated_percent (number)
data_points[].cpu_used_percent (number)
data_points[].disk_allocated_percent (number)
data_points[].host_count (integer)
data_points[].memory_allocated_percent (number)
data_points[].memory_used_percent (number)
data_points[].network_kbs_read (number)
data_points[].network_kbs_total (number)
data_points[].network_kbs_write (number)
data_points[].timestamp (string)
from (string)
granularity (string)
hostname (string)
to (string)
- GET /infrastructure/hosts/quick
List all nodes
Get all configured nodes including management node from BMC info
- Status Codes:
200 OK – Success response
500 Internal Server Error – Internal server error
- GET /infrastructure/hosts/sensors
Get current BMC sensor metrics
Returns the latest BMC sensor readings for a host from live Redfish calls
- Query Parameters:
hostname (string) – Host name
bmc_ip (string) – BMC IP address
- Status Codes:
200 OK – Current BMC sensor response
404 Not Found – Host not found
500 Internal Server Error – Sensor collection failed
- Response JSON Object:
alerts[].code (string)
alerts[].message (string)
alerts[].severity (string)
bmc_ip (string)
collected_at (string)
collector.last_attempt_at (string)
collector.last_error (string)
collector.last_error_at (string)
collector.last_source (string)
collector.last_success_at (string)
collector.observed_endpoints[] (string)
fans[].health (string)
fans[].member_id (string)
fans[].name (string)
fans[].reading_rpm (number)
fans[].state (string)
health (string)
hostname (string)
power_supplies[].health (string)
power_supplies[].member_id (string)
power_supplies[].name (string)
power_supplies[].state (string)
status (string)
summary.alert_count (integer)
summary.ambient_temperature_c (number)
summary.cpu_temperature_c (number)
summary.fan_absent_count (integer)
summary.fan_active_count (integer)
summary.fan_count (integer)
summary.fan_detected_count (integer)
summary.fan_failure_count (integer)
summary.power_draw_watts (number)
summary.psu_count (integer)
summary.psu_failure_count (integer)
vendor (string)
- GET /infrastructure/hosts/sensors/chart
Get BMC sensor chart
Returns BMC sensor history for charting from InfluxDB
- Query Parameters:
hostname (string) – Host name
granularity (string) – Time granularity: hour, day, week, month
from (string) – Start time in RFC3339 format
to (string) – End time in RFC3339 format
- Status Codes:
200 OK – BMC sensor chart data
400 Bad Request – Invalid request
500 Internal Server Error – Chart query failed
- Response JSON Object:
data_points[].alert_count (integer)
data_points[].ambient_temperature_c (number)
data_points[].average_fan_rpm (number)
data_points[].cpu_temperature_c (number)
data_points[].fan_failure_count (integer)
data_points[].power_draw_watts (number)
data_points[].psu_failure_count (integer)
data_points[].timestamp (string)
from (string)
granularity (string)
hostname (string)
to (string)
- GET /infrastructure/hosts/sensors/status
Get BMC sensor poll status
Returns last-attempt, last-success, last-error, and observed endpoint data for BMC sensor eligible nodes
- Query Parameters:
hostname (string) – Optional host name filter
- Status Codes:
200 OK – BMC sensor status
404 Not Found – Host not found
500 Internal Server Error – Status query failed
- Response JSON Object:
[].bmc_ip (string)
[].collector.last_attempt_at (string)
[].collector.last_error (string)
[].collector.last_error_at (string)
[].collector.last_source (string)
[].collector.last_success_at (string)
[].collector.observed_endpoints[] (string)
[].hostname (string)
[].status (string)
[].vendor (string)
- GET /infrastructure/hosts/sensors/stream
Stream BMC sensor metrics
Streams BMC sensor readings through Server-Sent Events
- Query Parameters:
hostname (string) – Host name
bmc_ip (string) – BMC IP address
- Status Codes:
200 OK – SSE stream
500 Internal Server Error – SSE unavailable