dots.v2.droplets.autoscale.get()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.droplets.autoscale.get(requestConfiguration?: RequestConfiguration<AutoscaleRequestBuilderGetQueryParameters>): Promise<undefined | AutoscaleGetResponse>

Description

To list all autoscale pools in your team, send a GET request to /v2/droplets/autoscale. The response body will be a JSON object with a key of autoscale_pools containing an array of autoscale pool objects. These each contain the standard autoscale pool attributes.

Parameters

perPage integer optional

Example: 2

Number of items returned per page

Default: 20

Min: 1

Max: 200

page integer optional

Example: 1

Which 'page' of paginated results to return.

Default: 1

Min: 1

name string optional

Example: my-autoscale-pool

The name of the autoscale pool

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.droplets.autoscale.get();

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page query parameter:

let response = await client.v2.droplets.autoscale.get();
let pages = response?.links?.pages;

while (pages && "next" in pages && typeof pages.next === "string") {
    const page = Number(new URL(pages.next).searchParams.get("page"));
    response = await client.v2.droplets.autoscale.get({
        queryParameters: {
            page,
        },
    });
    pages = response?.links?.pages;
}

Response Example

Show Response Example
{
  "autoscale_pools": [
    {
      "id": "0d3db13e-a604-4944-9827-7ec2642d32ac",
      "name": "test-autoscaler-group-01",
      "config": {
        "min_instances": 1,
        "max_instances": 5,
        "target_cpu_utilization": 0.5,
        "cooldown_minutes": 10
      },
      "droplet_template": {
        "name": "droplet-name",
        "size": "c-2",
        "region": "tor1",
        "image": "ubuntu-20-04-x64",
        "tags": [
          "my-tag"
        ],
        "ssh_keys": [
          "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"
        ],
        "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000",
        "with_droplet_agent": true,
        "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988",
        "public_networking": true,
        "ipv6": true,
        "user_data": "#cloud-config\nruncmd:\n  - touch /test.txt\n"
      },
      "created_at": "2020-11-19T20:27:18Z",
      "updated_at": "2020-12-01T00:42:16Z",
      "current_utilization": {
        "memory": 0.3588531587713522,
        "cpu": 0.0007338008770232183
      },
      "status": "active",
      "active_resources_count": 1
    }
  ],
  "links": {
    "pages": null
  },
  "meta": {
    "total": 1
  }
}

More Information

See /v2/droplets/autoscale in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.