To retrieve available memory metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/memory_available
.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
host_id |
string | True | The droplet ID. | |
start |
string | True | UNIX timestamp to start metric window. | |
end |
string | True | UNIX timestamp to end metric window. |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.monitoring.get_droplet_memory_available_metrics(host_id="17209102", start="1620683817", end="1620705417")
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.