pydo.projects.get_default()

Description

To get your default project, send a GET request to /v2/projects/default.

Request Sample

import os
from pydo import Client

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

resp = client.projects.get_default()

Responses

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

The response will be a JSON object with a key called project. The value of this will be an object with the standard project attributes

Click to expand an example response.
{
  "project": {
    "id": "addb4547-6bab-419a-8542-76263a033cf6",
    "owner_uuid": "99525febec065ca37b2ffe4f852fd2b2581895e7",
    "owner_id": 258992,
    "name": "Default",
    "description": "Default project",
    "purpose": "Just trying out DigitalOcean",
    "environment": "Development",
    "is_default": true,
    "created_at": "2017-10-19T21:44:20Z",
    "updated_at": "2019-11-05T18:50:03Z"
  }
}

Unauthorized

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

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

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"
}