Endpoints for monitoring cloud resources, retrieving resource metrics, and managing alerts for system events.
Endpoints for monitoring cloud resources, retrieving resource metrics, and managing alerts for system events.
/metrics/{resourceId}
Retrieve metrics for a specific resource.
metric_type
string
The type of metric to retrieve (e.g., cpu, memory, disk_io, network)
start_time
string
The start time for the metrics query in ISO 8601 format
end_time
string
The end time for the metrics query in ISO 8601 format
resourceId
string
required
The unique identifier of the resource
Metrics retrieved successfully
cpu_usage
array
memory_usage
array
disk_io
array
network
array
This response does not contain any headers
Resource not found
This response is empty
This response does not contain any headers
Metrics retrieved successfully
{ "cpu_usage": [ { "timestamp": "2023-05-18T12:34:56Z", "value": 75.3 }, { "timestamp": "2023-05-18T12:35:56Z", "value": 76.1 } ], "memory_usage": [ { "timestamp": "2023-05-18T12:34:56Z", "value": 64.5 }, { "timestamp": "2023-05-18T12:35:56Z", "value": 65.2 } ], "disk_io": [ { "timestamp": "2023-05-18T12:34:56Z", "read": 150.0, "write": 80.5 }, { "timestamp": "2023-05-18T12:35:56Z", "read": 155.2, "write": 82.1 } ], "network": [ { "timestamp": "2023-05-18T12:34:56Z", "inbound": 500.0, "outbound": 300.0 }, { "timestamp": "2023-05-18T12:35:56Z", "inbound": 520.1, "outbound": 310.3 } ] }
/alerts
Retrieve a list of all active alerts.
resource_id
string
The unique identifier of the resource
metric
string
The metric being monitored (e.g., cpu_usage, memory_usage)
status
string
The status of the alerts (e.g., active, resolved)
start_time
string
Filter alerts created after this time (in ISO 8601 format)
end_time
string
Filter alerts created before this time (in ISO 8601 format)
limit
int
Limit the number of alerts returned in the response
offset
int
The number of alerts to skip before starting to collect the result set
Alerts retrieved successfully
This response does not contain any headers
Alerts not found
This response is empty
This response does not contain any headers
Alerts retrieved successfully
[ { "id": "alert_123", "resource_id": "resource_123", "metric": "cpu_usage", "condition": ">", "threshold": 80.0, "status": "active", "created_at": "2023-05-18T12:34:56Z", "updated_at": "2023-05-18T12:34:56Z" }, { "id": "alert_456", "resource_id": "resource_456", "metric": "memory_usage", "condition": ">", "threshold": 70.0, "status": "resolved", "created_at": "2023-05-18T14:56:23Z", "updated_at": "2023-05-18T15:00:00Z" } ]
/alerts
Create a new alert for monitoring a specific metric or condition.
resource_id
string
required
The unique identifier of the resource to be monitored
metric
string
required
The metric to be monitored (e.g., cpu_usage, memory_usage)
condition
string
required
The condition for the alert (e.g., greater than, less than)
threshold
number
required
The threshold value for the alert
description
string
A brief description of the alert
Alert created successfully
id
string
The unique identifier for the new alert
resource_id
string
The unique identifier of the resource being monitored
metric
string
The metric being monitored
condition
string
The condition for the alert
threshold
number
The threshold value for the alert
description
string
A brief description of the alert
status
string
The status of the alert
created_at
string
The date and time when the alert was created
updated_at
string
The date and time when the alert was last updated
This response does not contain any headers
Invalid input
This response is empty
This response does not contain any headers
{ "resource_id": "resource_123", "metric": "cpu_usage", "condition": ">", "threshold": 80.0, "description": "Alert when CPU usage exceeds 80%" }
Alert created successfully
{ "id": "alert_789", "resource_id": "resource_123", "metric": "cpu_usage", "condition": ">", "threshold": 80.0, "description": "Alert when CPU usage exceeds 80%", "status": "active", "created_at": "2023-05-18T12:34:56Z", "updated_at": "2023-05-18T12:34:56Z" }
/alerts/{id}
Delete an existing alert by its identifier.
id
string
required
The unique identifier of the alert
Alert deleted successfully
This response is empty
This response does not contain any headers
Alert not found
This response is empty
This response does not contain any headers