For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.projects.list_resources_default()
Returns JSONRaises HttpResponseError
Description
To list all your resources in your default project, send a GET request to /v2/projects/default/resources.
Only resources that you are authorized to see will be returned. For example, to see Droplets in a project, include the droplet:read scope.
Request Sample
Show Request Sample
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.projects.list_resources_default()
Response Example
Show Response Example
{
"resources": [
{
"urn": "do:droplet:13457723",
"assigned_at": "2018-09-28T19:26:37Z",
"links": {
"self": "https://api.digitalocean.com/v2/droplets/13457723"
},
"status": "ok"
},
{
"urn": "do:domain:example.com",
"assigned_at": "2019-03-31T16:24:14Z",
"links": {
"self": "https://api.digitalocean.com/v2/domains/example.com"
},
"status": "ok"
}
],
"links": {
"pages": {
"first": "https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources?page=1",
"last": "https://api.digitalocean.com/v2/projects/4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679/resources?page=1"
}
},
"meta": {
"total": 2
}
}
See /v2/projects/default/resources in the API reference for additional detail on responses, headers, parameters, and more.