List History
List history events
gpu_droplets.autoscale.list_history(strautoscale_pool_id, AutoscaleListHistoryParams**kwargs) -> metaMetaPropertieshistorylistlinksPageLinksAutoscaleListHistoryResponse
get/v2/droplets/autoscale/{autoscale_pool_id}/history
To list all of the scaling history events of an autoscale pool, send a GET request to /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/history
.
The response body will be a JSON object with a key of history
. This will be
set to an array containing objects each representing a history event.
Parameters
autoscale_pool_idstr
pageint
optional
Which 'page' of paginated results to return.
minimum1
per_pageint
optional
Number of items returned per page
minimum1
maximum200
Returns
AutoscaleListHistoryResponseclass
from do_gradientai import GradientAI
client = GradientAI()
response = client.gpu_droplets.autoscale.list_history(
autoscale_pool_id="0d3db13e-a604-4944-9827-7ec2642d32ac",
)
print(response.meta)
200 Example
{
"history": [
{
"history_event_id": "01936530-4471-7b86-9634-32d8fcfecbc6",
"current_instance_count": 2,
"desired_instance_count": 2,
"reason": "CONFIGURATION_CHANGE",
"status": "success",
"created_at": "2020-11-19T20:27:18Z",
"updated_at": "2020-12-01T00:42:16Z"
}
],
"links": {
"pages": null
},
"meta": {
"total": 1
}
}