Skip to content

List history events

client.gpuDroplets.autoscale.listHistory(stringautoscalePoolID, AutoscaleListHistoryParams { page, per_page } query?, RequestOptionsoptions?): AutoscaleListHistoryResponse { meta, history, links }
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.

ParametersExpand Collapse
autoscalePoolID: string
query: AutoscaleListHistoryParams { page, per_page }
page?: number

Which 'page' of paginated results to return.

minimum1
per_page?: number

Number of items returned per page

minimum1
maximum200
ReturnsExpand Collapse
AutoscaleListHistoryResponse { meta, history, links }
meta: MetaProperties { total }

Information about the response itself.

total?: number

Number of objects returned by the request.

history?: Array<History>
created_at: string

The creation time of the history event in ISO8601 combined date and time format.

formatdate-time
current_instance_count: number

The current number of Droplets in the autoscale pool.

desired_instance_count: number

The target number of Droplets for the autoscale pool after the scaling event.

history_event_id: string

The unique identifier of the history event.

reason: "CONFIGURATION_CHANGE" | "SCALE_UP" | "SCALE_DOWN"

The reason for the scaling event.

Accepts one of the following:
"CONFIGURATION_CHANGE"
"SCALE_UP"
"SCALE_DOWN"
status: "in_progress" | "success" | "error"

The status of the scaling event.

Accepts one of the following:
"in_progress"
"success"
"error"
updated_at: string

The last updated time of the history event in ISO8601 combined date and time format.

formatdate-time
Accepts one of the following:
List history events
import Gradient from '@digitalocean/gradient';

const client = new Gradient({
  accessToken: 'My Access Token',
});

const response = await client.gpuDroplets.autoscale.listHistory('0d3db13e-a604-4944-9827-7ec2642d32ac');

console.log(response.meta);
{
  "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
  }
}
Returns Examples
{
  "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
  }
}