pydo.droplet_actions.list()

Generated on 9 Jun 2026 from pydo version v0.36.0

Usage

client.droplet_actions.list(
    droplet_id=3164444,
    per_page=20,
    page=1,
)
Returns JSONRaises HttpResponseError

Description

To retrieve a list of all actions that have been executed for a Droplet, send a GET request to /v2/droplets/{droplet_id}/actions.

The results will be returned as a JSON object with an actions key. This will be set to an array filled with action objects containing the standard action attributes.

Parameters

droplet_id integer required

A unique identifier for a Droplet instance.

Min: 1

per_page integer optional

Number of items returned per page

Min: 1

Max: 200

Default: 20

page integer optional

Which 'page' of paginated results to return.

Min: 1

Default: 1

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "blog",
  "type": "CNAME"
}

resp = client.droplet_actions.list(droplet_id=3164494)

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 parameter:

from urllib.parse import urlparse, parse_qs

resp = client.droplet_actions.list(droplet_id=3164444, )
pages = resp.get("links", {}).get("pages", {})

while "next" in pages:
    parsed = urlparse(pages["next"])
    page = int(parse_qs(parsed.query)["page"][0])
    resp = client.droplet_actions.list(droplet_id=3164444, page=page)
    pages = resp.get("links", {}).get("pages", {})

Response Example

Show Response Example
{
  "actions": [
    {
      "id": 982864273,
      "status": "completed",
      "type": "create",
      "started_at": "2020-07-20T19:37:30Z",
      "completed_at": "2020-07-20T19:37:45Z",
      "resource_id": 3164444,
      "resource_type": "droplet",
      "region": {
        "name": "New York 3",
        "slug": "nyc3",
        "features": [
          "private_networking",
          "backups",
          "ipv6",
          "metadata",
          "install_agent",
          "image_transfer"
        ],
        "available": true,
        "sizes": [
          "s-1vcpu-1gb",
          "s-1vcpu-2gb",
          "s-3vcpu-1gb",
          "s-2vcpu-2gb",
          "s-1vcpu-3gb",
          "s-2vcpu-4gb",
          "s-4vcpu-8gb",
          "m-1vcpu-8gb",
          "s-6vcpu-16gb",
          "s-8vcpu-32gb",
          "s-12vcpu-48gb"
        ]
      },
      "region_slug": "nyc3"
    }
  ],
  "links": {},
  "meta": {
    "total": 1
  }
}

More Information

See /v2/droplets/{droplet_id}/actions 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.