To update a project, send a PUT request to /v2/projects/$PROJECT_ID
. All of the following attributes must be sent.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
project_id |
string | True | A unique identifier for a project. | |
body |
JSON or IO[bytes] | True |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"name": "my-web-api",
"description": "My website API",
"purpose": "Service or API",
"environment": "Production",
"is_default": False
}
resp = client.projects.update_default(body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.