pydo.apps.list()

Description

List all apps on your account. Information about the current active deployment as well as any in progress ones will also be included for each app.

Parameters

Name Type Required Description Default Value
page integer False Which ‘page’ of paginated results to return. 1
per_page integer False Number of items returned per page 20
with_projects boolean False Whether the project_id of listed apps should be fetched and included.

Request Sample

import os
from pydo import Client

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

get_resp = client.apps.list()

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object with a apps key. This is list of object apps.

Click to expand an example response for apps.
{
  "value": {
    "apps": [
      {
        "id": "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf",
        "owner_uuid": "ff36cbc6fd350fe12577f5123133bb5ba01a2419",
        "spec": {
          "name": "sample-php",
          "services": [
            {
              "name": "sample-php",
              "git": {
                "repo_clone_url": "https://github.com/digitalocean/sample-php.git",
                "branch": "main"
              },
              "run_command": "heroku-php-apache2",
              "environment_slug": "php",
              "instance_size_slug": "apps-s-1vcpu-0.5gb",
              "instance_count": 1,
              "http_port": 8080,
              "routes": [
                {
                  "path": "/"
                }
              ]
            }
          ],
          "domains": [
            {
              "domain": "sample-php.example.com",
              "type": "PRIMARY",
              "zone": "example.com",
              "minimum_tls_version": "1.3"
            }
          ]
        },
        "default_ingress": "https://sample-php-iaj87.ondigitalocean.app",
        "created_at": "2020-11-19T20:27:18Z",
        "updated_at": "2020-12-01T00:42:16Z",
        "active_deployment": {
          "id": "3aa4d20e-5527-4c00-b496-601fbd22520a",
          "spec": {
            "name": "sample-php",
            "services": [
              {
                "name": "sample-php",
                "git": {
                  "repo_clone_url": "https://github.com/digitalocean/sample-php.git",
                  "branch": "main"
                },
                "run_command": "heroku-php-apache2",
                "environment_slug": "php",
                "instance_size_slug": "apps-s-1vcpu-0.5gb",
                "instance_count": 1,
                "http_port": 8080,
                "routes": [
                  {
                    "path": "/"
                  }
                ]
              }
            ],
            "region": "fra",
            "domains": [
              {
                "domain": "sample-php.example.com",
                "type": "PRIMARY",
                "zone": "example.com",
                "minimum_tls_version": "1.3"
              }
            ]
          },
          "services": [
            {
              "name": "sample-php",
              "source_commit_hash": "54d4a727f457231062439895000d45437c7bb405"
            }
          ],
          "phase_last_updated_at": "2020-12-01T00:42:12Z",
          "created_at": "2020-12-01T00:40:05Z",
          "updated_at": "2020-12-01T00:42:12Z"
        },
        "cause": "app spec updated",
        "pending_deployment": {
          "id": "3aa4d20e-5527-4c00-b496-601fbd22520a",
          "spec": {
            "name": "sample-php",
            "services": [
              {
                "name": "sample-php",
                "git": {
                  "repo_clone_url": "https://github.com/digitalocean/sample-php.git",
                  "branch": "main"
                },
                "run_command": "heroku-php-apache2",
                "environment_slug": "php",
                "instance_size_slug": "apps-s-1vcpu-0.5gb",
                "instance_count": 1,
                "http_port": 8080,
                "routes": [
                  {
                    "path": "/"
                  }
                ]
              }
            ],
            "region": "fra",
            "domains": [
              {
                "domain": "sample-php.example.com",
                "type": "PRIMARY",
                "zone": "example.com",
                "minimum_tls_version": "1.3"
              }
            ]
          },
          "services": [
            {
              "name": "sample-php",
              "source_commit_hash": "54d4a727f457231062439895000d45437c7bb405"
            }
          ],
          "phase_last_updated_at": "2020-12-01T00:42:12Z",
          "created_at": "2020-12-01T00:40:05Z",
          "updated_at": "2020-12-01T00:42:12Z"
        },
        "progress": {
          "success_steps": 6,
          "total_steps": 6,
          "steps": [
            {
              "name": "build",
              "status": "SUCCESS",
              "steps": [
                {
                  "name": "initialize",
                  "status": "SUCCESS",
                  "started_at": "2020-12-01T00:40:11.979305214Z",
                  "ended_at": "2020-12-01T00:40:12.470972033Z"
                },
                {
                  "name": "components",
                  "status": "SUCCESS",
                  "steps": [
                    {
                      "name": "sample-php",
                      "status": "SUCCESS",
                      "started_at": "0001-01-01T00:00:00Z",
                      "ended_at": "0001-01-01T00:00:00Z",
                      "component_name": "sample-php",
                      "message_base": "Building service"
                    }
                  ],
                  "started_at": "2020-12-01T00:40:12.470996857Z",
                  "ended_at": "2020-12-01T00:41:26.180360487Z"
                }
              ],
              "started_at": "2020-12-01T00:40:11.979257919Z",
              "ended_at": "2020-12-01T00:41:26.653989756Z"
            }
          ],
          "phase": "ACTIVE",
          "tier_slug": "basic"
        },
        "last_deployment_created_at": "2020-12-01T00:40:05Z",
        "live_url": "https://sample-php.example.com",
        "region": {
          "slug": "fra",
          "label": "Frankfurt",
          "flag": "germany",
          "continent": "Europe",
          "data_centers": [
            "fra1"
          ]
        },
        "tier_slug": "basic",
        "live_url_base": "https://sample-php.example.com",
        "live_domain": "sample-php.example.com",
        "domains": [
          {
            "id": "0831f444-a1a7-11ed-828c-ef59494480b5",
            "phase": "ACTIVE",
            "spec": {
              "domain": "sample-php.example.com",
              "type": "PRIMARY",
              "zone": "example.com",
              "minimum_tls_version": "1.3"
            },
            "rotate_validation_records": false,
            "certificate_expires_at": "2024-01-29T23:59:59Z",
            "progress": {
              "steps": [
                {
                  "ended_at": "0001-01-01T00:00:00Z",
                  "name": "default-ingress-ready",
                  "started_at": "2023-01-30T22:15:45.021896292Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "0001-01-01T00:00:00Z",
                  "name": "ensure-zone",
                  "started_at": "2023-01-30T22:15:45.022017004Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:42:28.50752065Z",
                  "name": "ensure-ns-records",
                  "started_at": "2023-01-30T22:15:45.025567874Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "0001-01-01T00:00:00Z",
                  "name": "verify-nameservers",
                  "started_at": "2023-01-30T22:15:45.033591906Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "0001-01-01T00:00:00Z",
                  "name": "ensure-record",
                  "started_at": "2023-01-30T22:15:45.156750604Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:43:30.258626422Z",
                  "name": "ensure-alias-record",
                  "started_at": "2023-01-30T22:15:45.165933869Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:43:30.258808279Z",
                  "name": "ensure-wildcard-record",
                  "started_at": "2023-01-30T22:15:45.166093422Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "0001-01-01T00:00:00Z",
                  "name": "verify-cname",
                  "started_at": "2023-01-30T22:15:45.166205559Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:43:30.475903785Z",
                  "name": "ensure-ssl-txt-record-saved",
                  "started_at": "2023-01-30T22:15:45.295237186Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:43:30.476017236Z",
                  "name": "ensure-ssl-txt-record",
                  "started_at": "2023-01-30T22:15:45.295315291Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:43:30.476094058Z",
                  "name": "ensure-renewal-email",
                  "started_at": "2023-01-30T22:15:45.295374087Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "0001-01-01T00:00:00Z",
                  "name": "ensure-CA-authorization",
                  "started_at": "2023-01-30T22:15:45.295428101Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "0001-01-01T00:00:00Z",
                  "name": "ensure-certificate",
                  "started_at": "2023-01-30T22:15:45.978756406Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:43:52.570612857Z",
                  "name": "create-deployment",
                  "started_at": "0001-01-01T00:00:00Z",
                  "status": "SUCCESS"
                },
                {
                  "ended_at": "2023-01-30T15:43:31.333582377Z",
                  "name": "configuration-alert",
                  "started_at": "2023-01-30T22:15:46.278987808Z",
                  "status": "SUCCESS"
                }
              ]
            }
          }
        ],
        "dedicated_ips": [
          {
            "ip": "192.168.1.1",
            "id": "c24d8f48-3bc4-49f5-8ca0-58e8164427ac",
            "status": "ASSIGNED"
          },
          {
            "ip": "192.168.1.2",
            "id": "4768fb15-2837-4dda-9be5-3951df4bc3d0",
            "status": "ASSIGNED"
          }
        ]
      }
    ],
    "links": {
      "pages": {}
    },
    "meta": {
      "total": 1
    }
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}
In this article...