Skip to content
  • Auto
  • Light
  • Dark

List

List All Droplets
gpu_droplets.list(GPUDropletListParams**kwargs) -> metaMetaPropertiesdropletslistlinksPageLinksGPUDropletListResponse
get/v2/droplets

To list all Droplets in your account, send a GET request to /v2/droplets.

The response body will be a JSON object with a key of droplets. This will be set to an array containing objects each representing a Droplet. These will contain the standard Droplet attributes.

Filtering Results by Tag

It's possible to request filtered results by including certain query parameters. To only list Droplets assigned to a specific tag, include the tag_name query parameter set to the name of the tag in your GET request. For example, /v2/droplets?tag_name=$TAG_NAME.

GPU Droplets

By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the type query parameter to gpus. For example, /v2/droplets?type=gpus.

Parameters
namestr
optional

Used to filter list response by Droplet name returning only exact matches. It is case-insensitive and can not be combined with tag_name.

pageint
optional

Which 'page' of paginated results to return.

minimum1
per_pageint
optional

Number of items returned per page

minimum1
maximum200
tag_namestr
optional

Used to filter Droplets by a specific tag. Can not be combined with name or type.
Requires tag:read scope.

typeliteral
optional
Literal["droplets", "gpus"]

When type is set to gpus, only GPU Droplets will be returned. By default, only non-GPU Droplets are returned. Can not be combined with tag_name.

Hide ParametersShow Parameters
"droplets"
"gpus"
Returns
GPUDropletListResponseclass
Hide ParametersShow Parameters
metatotalintMetaProperties

Information about the response itself.

dropletslist
optional
Optional[List[idintbackup_idslistcreated_atdatetimediskintfeatureslistimageImagelockedboolmemoryintnamestrnetworksNetworksnext_backup_windowDropletNextBackupWindowregionRegionsizeSizesize_slugstrsnapshot_idsliststatusliteraltagslistvcpusintvolume_idslistdisk_infolistgpu_infoGPUInfokernelKernelvpc_uuidstrDroplet]]
Hide ParametersShow Parameters
idint

A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation.

backup_idslist
List[int]

An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.
Requires image:read scope.

created_atdatetime

A time value given in ISO8601 combined date and time format that represents when the Droplet was created.

formatdate-time
diskint

The size of the Droplet's disk in gigabytes.

featureslist
List[str]

An array of features enabled on this Droplet.

imageidintcreated_atdatetimedescriptionstrdistributionliteralerror_messagestrmin_disk_sizeintnamestrpublicboolregionslistsize_gigabytesfloatslugstrstatusliteraltagslisttypeliteralImage

The Droplet's image.
Requires image:read scope.

lockedbool

A boolean value indicating whether the Droplet has been locked, preventing actions by users.

memoryint

Memory of the Droplet in megabytes.

multipleOf8
namestr

The human-readable name set for the Droplet instance.

networksv4listv6listNetworks

The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is.

Hide ParametersShow Parameters
v4list
optional
Optional[List[gatewaystrip_addressstrnetmaskstrtypeliteralNetworkV4]]
Hide ParametersShow Parameters
gatewaystr
optional

The gateway of the specified IPv4 network interface.

For private interfaces, a gateway is not provided. This is denoted by returning nil as its value.

ip_addressstr
optional

The IP address of the IPv4 network interface.

formatipv4
netmaskstr
optional

The netmask of the IPv4 network interface.

formatipv4
typeliteral
optional
Optional[Literal["public", "private"]]

The type of the IPv4 network interface.

Hide ParametersShow Parameters
"public"
"private"
v6list
optional
Optional[List[gatewaystrip_addressstrnetmaskinttypeliteralNetworkV6]]
Hide ParametersShow Parameters
gatewaystr
optional

The gateway of the specified IPv6 network interface.

formatipv6
ip_addressstr
optional

The IP address of the IPv6 network interface.

formatipv6
netmaskint
optional

The netmask of the IPv6 network interface.

typeliteral
optional
Optional[Literal["public"]]

The type of the IPv6 network interface.

Note: IPv6 private networking is not currently supported.

Hide ParametersShow Parameters
"public"
next_backup_windowDropletNextBackupWindow

The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start.

regionavailableboolfeatureslistnamestrsizeslistslugstrRegion
sizeavailablebooldescriptionstrdiskintmemoryintprice_hourlyfloatprice_monthlyfloatregionslistslugstrtransferfloatvcpusintdisk_infolistgpu_infoGPUInfoSize
size_slugstr

The unique slug identifier for the size of this Droplet.

snapshot_idslist
List[int]

An array of snapshot IDs of any snapshots created from the Droplet instance.
Requires image:read scope.

statusliteral
Literal["new", "active", "off", "archive"]

A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive".

Hide ParametersShow Parameters
"new"
"active"
"off"
"archive"
tagslist
List[str]

An array of Tags the Droplet has been tagged with.
Requires tag:read scope.

vcpusint

The number of virtual CPUs.

volume_idslist
List[str]

A flat array including the unique identifier for each Block Storage volume attached to the Droplet.
Requires block_storage:read scope.

disk_infolist
optional
Optional[List[sizeSizetypeliteralDiskInfo]]

An array of objects containing information about the disks available to the Droplet.

Hide ParametersShow Parameters
sizeamountintunitstrSize
optional
Hide ParametersShow Parameters
amountint
optional

The amount of space allocated to the disk.

unitstr
optional

The unit of measure for the disk size.

typeliteral
optional
Optional[Literal["local", "scratch"]]

The type of disk. All Droplets contain a local disk. Additionally, GPU Droplets can also have a scratch disk for non-persistent data.

Hide ParametersShow Parameters
"local"
"scratch"
gpu_infoGPUInfo
optional

An object containing information about the GPU capabilities of Droplets created with this size.

kernelKernel
optional
deprecated

Note: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to null.

The current kernel for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created.

vpc_uuidstr
optional

A string specifying the UUID of the VPC to which the Droplet is assigned.
Requires vpc:read scope.

from do_gradientai import GradientAI

client = GradientAI()
gpu_droplets = client.gpu_droplets.list()
print(gpu_droplets.meta)
200 Example
{
  "droplets": [
    {
      "id": 3164444,
      "name": "example.com",
      "memory": 1024,
      "vcpus": 1,
      "disk": 25,
      "disk_info": [
        {
          "type": "local",
          "size": {
            "amount": 25,
            "unit": "gib"
          }
        }
      ],
      "locked": false,
      "status": "active",
      "kernel": null,
      "created_at": "2020-07-21T18:37:44Z",
      "features": [
        "backups",
        "private_networking",
        "ipv6"
      ],
      "backup_ids": [
        53893572
      ],
      "next_backup_window": {
        "start": "2020-07-30T00:00:00Z",
        "end": "2020-07-30T23:00:00Z"
      },
      "snapshot_ids": [
        67512819
      ],
      "image": {
        "id": 63663980,
        "name": "20.04 (LTS) x64",
        "distribution": "Ubuntu",
        "slug": "ubuntu-20-04-x64",
        "public": true,
        "regions": [
          "ams2",
          "ams3",
          "blr1",
          "fra1",
          "lon1",
          "nyc1",
          "nyc2",
          "nyc3",
          "sfo1",
          "sfo2",
          "sfo3",
          "sgp1",
          "tor1"
        ],
        "created_at": "2020-05-15T05:47:50Z",
        "type": "snapshot",
        "min_disk_size": 20,
        "size_gigabytes": 2.36,
        "description": "",
        "tags": [],
        "status": "available",
        "error_message": ""
      },
      "volume_ids": [],
      "size": {
        "slug": "s-1vcpu-1gb",
        "memory": 1024,
        "vcpus": 1,
        "disk": 25,
        "transfer": 1,
        "price_monthly": 5,
        "price_hourly": 0.00743999984115362,
        "regions": [
          "ams2",
          "ams3",
          "blr1",
          "fra1",
          "lon1",
          "nyc1",
          "nyc2",
          "nyc3",
          "sfo1",
          "sfo2",
          "sfo3",
          "sgp1",
          "tor1"
        ],
        "available": true,
        "description": "Basic"
      },
      "size_slug": "s-1vcpu-1gb",
      "networks": {
        "v4": [
          {
            "ip_address": "10.128.192.124",
            "netmask": "255.255.0.0",
            "gateway": "nil",
            "type": "private"
          },
          {
            "ip_address": "192.241.165.154",
            "netmask": "255.255.255.0",
            "gateway": "192.241.165.1",
            "type": "public"
          }
        ],
        "v6": [
          {
            "ip_address": "2604:a880:0:1010::18a:a001",
            "netmask": 64,
            "gateway": "2604:a880:0:1010::1",
            "type": "public"
          }
        ]
      },
      "region": {
        "name": "New York 3",
        "slug": "nyc3",
        "features": [
          "private_networking",
          "backups",
          "ipv6",
          "metadata",
          "install_agent",
          "storage",
          "image_transfer"
        ],
        "available": true,
        "sizes": [
          "s-1vcpu-1gb",
          "s-1vcpu-2gb",
          "s-1vcpu-3gb",
          "s-2vcpu-2gb",
          "s-3vcpu-1gb",
          "s-2vcpu-4gb",
          "s-4vcpu-8gb",
          "s-6vcpu-16gb",
          "s-8vcpu-32gb",
          "s-12vcpu-48gb",
          "s-16vcpu-64gb",
          "s-20vcpu-96gb",
          "s-24vcpu-128gb",
          "s-32vcpu-192g"
        ]
      },
      "tags": [
        "web",
        "env:prod"
      ],
      "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000"
    },
    {
      "id": 3164459,
      "name": "assets.example.com",
      "memory": 1024,
      "vcpus": 1,
      "disk": 25,
      "disk_info": [
        {
          "type": "local",
          "size": {
            "amount": 25,
            "unit": "gib"
          }
        }
      ],
      "locked": false,
      "status": "active",
      "kernel": null,
      "created_at": "2020-07-21T18:42:27Z",
      "features": [
        "private_networking"
      ],
      "backup_ids": [],
      "next_backup_window": {
        "start": "2020-07-30T00:00:00Z",
        "end": "2020-07-30T23:00:00Z"
      },
      "snapshot_ids": [],
      "image": {
        "id": 63663980,
        "name": "20.04 (LTS) x64",
        "distribution": "Ubuntu",
        "slug": "ubuntu-20-04-x64",
        "public": true,
        "regions": [
          "ams2",
          "ams3",
          "blr1",
          "fra1",
          "lon1",
          "nyc1",
          "nyc2",
          "nyc3",
          "sfo1",
          "sfo2",
          "sfo3",
          "sgp1",
          "tor1"
        ],
        "created_at": "2020-05-15T05:47:50Z",
        "type": "snapshot",
        "min_disk_size": 20,
        "size_gigabytes": 2.36,
        "description": "",
        "tags": [],
        "status": "available",
        "error_message": ""
      },
      "volume_ids": [
        "506f78a4-e098-11e5-ad9f-000f53306ae1"
      ],
      "size": {
        "slug": "s-1vcpu-1gb",
        "memory": 1024,
        "vcpus": 1,
        "disk": 25,
        "transfer": 1,
        "price_monthly": 5,
        "price_hourly": 0.00743999984115362,
        "regions": [
          "ams2",
          "ams3",
          "blr1",
          "fra1",
          "lon1",
          "nyc1",
          "nyc2",
          "nyc3",
          "sfo1",
          "sfo2",
          "sfo3",
          "sgp1",
          "tor1"
        ],
        "available": true,
        "description": "Basic"
      },
      "size_slug": "s-1vcpu-1gb",
      "networks": {
        "v4": [
          {
            "ip_address": "10.128.192.138",
            "netmask": "255.255.0.0",
            "gateway": "nil",
            "type": "private"
          },
          {
            "ip_address": "162.243.0.4",
            "netmask": "255.255.255.0",
            "gateway": "162.243.0.1",
            "type": "public"
          }
        ],
        "v6": []
      },
      "region": {
        "name": "New York 3",
        "slug": "nyc3",
        "features": [
          "private_networking",
          "backups",
          "ipv6",
          "metadata",
          "install_agent",
          "storage",
          "image_transfer"
        ],
        "available": true,
        "sizes": [
          "s-1vcpu-1gb",
          "s-1vcpu-2gb",
          "s-1vcpu-3gb",
          "s-2vcpu-2gb",
          "s-3vcpu-1gb",
          "s-2vcpu-4gb",
          "s-4vcpu-8gb",
          "s-6vcpu-16gb",
          "s-8vcpu-32gb",
          "s-12vcpu-48gb",
          "s-16vcpu-64gb",
          "s-20vcpu-96gb",
          "s-24vcpu-128gb",
          "s-32vcpu-192g"
        ]
      },
      "tags": [
        "storage",
        "env:prod"
      ],
      "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000"
    },
    {
      "id": 3164412,
      "name": "stage.example.com",
      "memory": 1024,
      "vcpus": 1,
      "disk": 25,
      "disk_info": [
        {
          "type": "local",
          "size": {
            "amount": 25,
            "unit": "gib"
          }
        }
      ],
      "locked": false,
      "status": "active",
      "kernel": null,
      "created_at": "2020-07-21T18:32:55Z",
      "features": [
        "private_networking"
      ],
      "backup_ids": [],
      "next_backup_window": {
        "start": "2020-07-30T00:00:00Z",
        "end": "2020-07-30T23:00:00Z"
      },
      "snapshot_ids": [],
      "image": {
        "id": 63663980,
        "name": "20.04 (LTS) x64",
        "distribution": "Ubuntu",
        "slug": "ubuntu-20-04-x64",
        "public": true,
        "regions": [
          "ams2",
          "ams3",
          "blr1",
          "fra1",
          "lon1",
          "nyc1",
          "nyc2",
          "nyc3",
          "sfo1",
          "sfo2",
          "sfo3",
          "sgp1",
          "tor1"
        ],
        "created_at": "2020-05-15T05:47:50Z",
        "type": "snapshot",
        "min_disk_size": 20,
        "size_gigabytes": 2.36,
        "description": "",
        "tags": [],
        "status": "available",
        "error_message": ""
      },
      "volume_ids": [
        "7724db7c-e098-11e5-b522-000f53304e51"
      ],
      "size": {
        "slug": "s-1vcpu-1gb",
        "memory": 1024,
        "vcpus": 1,
        "disk": 25,
        "transfer": 1,
        "price_monthly": 5,
        "price_hourly": 0.00743999984115362,
        "regions": [
          "ams2",
          "ams3",
          "blr1",
          "fra1",
          "lon1",
          "nyc1",
          "nyc2",
          "nyc3",
          "sfo1",
          "sfo2",
          "sfo3",
          "sgp1",
          "tor1"
        ],
        "available": true,
        "description": "Basic"
      },
      "size_slug": "s-1vcpu-1gb",
      "networks": {
        "v4": [
          {
            "ip_address": "10.128.192.125",
            "netmask": "255.255.0.0",
            "gateway": "nil",
            "type": "private"
          },
          {
            "ip_address": "192.241.247.248",
            "netmask": "255.255.255.0",
            "gateway": "192.241.247.1",
            "type": "public"
          }
        ],
        "v6": []
      },
      "region": {
        "name": "New York 3",
        "slug": "nyc3",
        "features": [
          "private_networking",
          "backups",
          "ipv6",
          "metadata",
          "install_agent",
          "storage",
          "image_transfer"
        ],
        "available": true,
        "sizes": [
          "s-1vcpu-1gb",
          "s-1vcpu-2gb",
          "s-1vcpu-3gb",
          "s-2vcpu-2gb",
          "s-3vcpu-1gb",
          "s-2vcpu-4gb",
          "s-4vcpu-8gb",
          "s-6vcpu-16gb",
          "s-8vcpu-32gb",
          "s-12vcpu-48gb",
          "s-16vcpu-64gb",
          "s-20vcpu-96gb",
          "s-24vcpu-128gb",
          "s-32vcpu-192g"
        ]
      },
      "tags": [
        "env:stage"
      ],
      "vpc_uuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4"
    }
  ],
  "links": {
    "pages": {}
  },
  "meta": {
    "total": 3
  }
}